I’m trying to debug an issue that only occurs when my iPhone app receives a push notification.
The trouble is I can’t figure out how to get a debugger, or even view any NSLog output, when my app is launched in this way. Xcode gives me a debugger and the gdb console when it launches an app for me.
So how do I run my app in the debugger when Xcode does not launch my app for me?
Asked and answered at Debugging App When Launched by Push Notification
See also the Apple documentation at http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeProjectManagement/230-Defining_Executable_Environments/executable_environments.html#//apple_ref/doc/uid/TP40002698-CJBICGJI