Debugging a Application Launch in Xcode and iOS
In the Scheme editor in Xcode, you can edit the Debug profile to have the debugger "Wait for XY.app to launch". If you then select Product -> Run, the debugger should wait until you launch the app manually on the device and then automatically attach to the running process.
If you want to avoid the build & run phase altogether / changing build configs, you can achieve a cold-start reattach by:
- going to Debug menu >
Attach to Process by PID or Name...
- putting your app name in the first input & clicking
Attach
You'll then see "Waiting to attach to APPNAME on somedevice", and you can just reopen the app on the simulator.