Learn to debug iOS features that require app start from external actions in Xcode
How to debug features like deep linking or home screen quick actions.
27 Jan 2025 · 2 min read
Debugging iOS features that require app starts from external actions - such as deep linking or home screen quick actions - can be challenging. By default, when running an app in Xcode, the debugger automatically attaches itself. However, once the app is killed on the simulator or device, the debugger detaches, making it difficult to test features that require the app to be launched from an external action.
Xcode offers a solution: the "Wait for executable to be launched" scheme option. This allows us to attach the debugger to the app even when launching it manually.

Steps to enable the debugger for manual launch
To activate the Wait for executable to be launched feature:
- Edit the scheme:
- Go to the Xcode menu and select Product > Scheme > Edit Scheme.
- Enable the setting:
- Under the Info tab in the Launch section, select the option: "Wait for executable to be launched".
- Run the app:
- Start running the app in Xcode. The app won’t automatically launch as it typically does. Instead, Xcode will pause and wait for us to manually launch the app from the simulator or device.
Debugging Features After Manual Launch
Once the app is manually launched, Xcode will automatically attach the debugger. This setup is especially useful for testing:
- Deep Linking / Universal Links: Tap a deep link to launch the app and verify the flow.
- Home Screen Quick Actions: Trigger an action and ensure the app behaves as expected.
By keeping the debugger attached during these scenarios, we can use breakpoints, inspect variables, and view console logs to diagnose any issues.



Newsletter
Like to support my work?
Say hi
Related tags
Articles with related topics
Latest articles and tips



