Ad Hoc/Distribution builds do not allow connecting with the debugger, so you'll have to settle for watching its output in the console of the Xcode Organiser
.
The Code Signing Identity
should be iOS Distribution
and the provisioning profile should be your ad hoc one. You can set this in your build settings, but the usual way is to Archive
then Distribute
as Ad Hoc and then install onto your device.
You can also temporarily mangle your build settings, run, ignore the error and launch manually on the device.