This sounds to me like you are trying to debug an app where you have set get-allows-task to NO in your Entitlements.plist file (for instance, for a Ad Hoc build).
Does your project have an Entitlements.plist file? If so, check the value of get-allows-task. If you are running the Debug configuration, this must be set to YES
If you open the file by single clicking on it, so it's displayed in the property list editor rather than the code editor then the required parameter is (confusingly) named Can be debugged
Edit: Added screenshot to show where Code Signing Entitlements can be found
