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 attach the debugger to a running process:

  1. Choose Debug > Attach Debugger or click the down arrow next to the Debug Main Project toolbar button Debug Main Project button  and choose Attach Debugger..

    The Attach dialog box opens displaying a list of all of your currently active processes.

  2. 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.
  3. If you want to filter the list of processes, type the string you want to match in the Filter text field.
  4. Select the process to which you want to attach the debugger.
  5. The executable associated with the process is automatically displayed in the Executable text field.
  6. By default, the Project text field displays the name of the main project. 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.

  7. Click OK.
See Also
Starting a C or C++ Debugging Session

Legal Notices