When you start debugging a program, you can set an option from the Run Specifications view so that a process tab opens for any child process started by the program. You can then switch between the process tab for the parent process, and those for any child processes, and view information for each process. However, you cannot use step or run commands in the parent process if the child process causes the parent process to suspend, for example when using system, or _spawnl with a MODEFLAG argument of PWAIT. Follow these steps to debug child processes:
Each time the parent process starts a child process, a breakpoint is set on entry to the main function of the child process, or, if the main function cannot be found, a breakpoint is set at the entry point for the child process. If the child process is an application created by the IDE and a codestore is available for it, all breakpoints contained in the codestore are also set for it. Execution stops at the first encountered breakpoint.
If the child process was created in suspend mode, step and run commands in the thread of the parent process that created the child process have no effect until the child process terminates.
![]()
Start a Program Under
Debug Control
![]()
Limits on Child Process
Debugging
