Xcode 9 - Instruments permission denied

I've been researchng this and can't find any definitive solution.


Instruments continues to exhibit the following on two different machines but not on a third.


Target failed to run.

Permission to debug com.xxxx.*** was denied.


Invoking Xcode->Product->Profile fails set up Instruments correctly. As does any other Instruments launch / connection strategy that I have tried.


I get the same error on my MacBook and Mac Pro but NOT on another MacBook.


Can anyone please explain what is going on and more importantly how to fix it?


Thanks

Jason

This works for me!

Run this command to terminal



sudo open /Applications/Xcode.app/Contents/Applications/Instruments.app

Running Instruments as root is probably not a very good idea.


I still see this problem with Xcode 9.1.

check your app Scheme set that profile was debug.if still not working,check your command line tools was setup correctly(type `Xcode-select --install` in Terminal and restart your Mac).hope its helpful

I had the same issue and it was to do with the system needing me to authorise the debugging with my keychain password. To get it to put up the keychain dialog I ran my app on the simulator so it was a running process. Then I went back to Instruments and selected my running app and pressed the record button. The keychain dialog appeared asking for permission to attach and I typed in my password. This allowed me to profile my app. The next time I profiled my app from XCode, permission was already established and saved and it now works as it did before

Xcode Product -> Scheme - > Edit Scheme- > Profile - >Info -> Build Configuration must be Debug checked

Xcode 9 - Instruments permission denied
 
 
Q