Ackman
Ackman

Reputation: 1592

Debugging not happening on iOS device XCODE8

I am not able to launch my app on my iphone device and debugg. That is, my debugger does not get attached when I am using my device for debugging. How do I enable that?

The error states could not attach to process...

how do I enable debugger for xcode8 for my device? It is an iPhone iOS 10

Upvotes: 0

Views: 373

Answers (1)

Jim Ingham
Jim Ingham

Reputation: 27203

If you are getting the "failed to get the task for pid" error, that means that your app does now allow itself to be debugged. On iOS, by default, the debugger is NOT allowed to attach to an iOS app. When you build the debug configuration of your app, Xcode automatically adds the correct entitlement, and the debugger is allowed to attach. The release configuration typically does not add this entitlement, so you generally can't attach to release builds.

For more info on this entitlement, see for instance:

What does get-task-allow do in Xcode?

Without looking at your project it's hard to know what has gone wrong, but this might give you a place to start looking.

Upvotes: 1

Related Questions