In Xcode, how does one set breakpoint debugging in the APP to be started? xcodeapp
In an actual App, we may encounter a situation where we design an APP that passively starts loading when the outside world sends a message or meets certain conditions, initialization is performed based on some parameters passed in from the outside world.
Because the program is started by other programs, we cannot compile and run the program directly in XCode and set breakpoint debugging. Fortunately, XCode provides the debugging function attached to the process, and can wait for the process to run by the process name before the process starts, and when the process is actually loaded, go to breakpoint debugging. The specific method is as follows:
1. Select Debug-> Attach to Process-> By Process Identifier or Name in XCode to be debugged...
2. In the PID or Process Name dialog box that appears, enter the Process Name (usually your project Name) and click Attach.
After the configuration is complete, you can start other processes on the Virtual Machine (rather than the process to be debugged). After the process is started, XCode automatically enters the debugging status.