Attaching the Debugger to a Running Process
See Also
If you want to debug a program that is already running, you can
attach the debugger to the appropriate process.
You might want to attach the debugger to a running process
under the following circumstances:
- To debug a running server without stopping or killing it
- To debug a running GUI program without restarting it
- To debug a program that is looping indefinitely without
killing it
- To collect program performance data
To attach the debugger to a running process:
- Choose Debug > Attach Debugger.
The Attach dialog box opens displaying a list of all of your
currently active processes.
- Select the local host or a remote host from the Host drop-down list.
To add a new remote host, click Hosts and define the new host in the
Remote Host Settings dialog box.
- If you want to filter the list of processes, type the
string you want to match in the Filter text box.
The filter uses the same limited regular expressions as the
grep command. See the grep(1) man page for the
specification for regular expressions.
- Select the process to which you want to attach the debugger.
- Type the full path to the
executable in the Executable text field, or click the browse button and
navigate to the executable in the Select Executable dialog box.
- By default, the Project text field displays either <no project>
or the name of an existing project that exactly matches the name of the
executable. If you want a different project associated with this executable,
select a project from the Project drop-down list. If you do not want
the executable associated with a project, select <no project> If you want a new project
created for the executable, select <create new project>.
If you create a new project for your executable, only the executable is stored in the
project properties. You need to set the other project
properties by right-clicking the project in the Projects window and choosing Project
Properties.
- Click OK.
Legal Notices