Attaching to a local running process

ngjava.gif (225 bytes) Important: You can only attach to a running process when debugging a High Performance Compiled (HPC) Java program. For interpreted Java programs, you must attach to a running Java Virtual Machine (JVM). See the related topic below on how to attach to a running JVM.

You can attach the debugger to a running process either by using the Process List dialog or from a command line by using the -a option of the idebug command. See the related topic below on when to attach to a running process.

To attach the debugger to running process with the Process List dialog:

  1. Select File > Attach Process to invoke the Process List dialog.
  2. Select the process you want to attach from the Select Process list.
  3. If the Process Path field is enabled, enter the full path name to the executable associated with the process you want to attach.
  4. Click Attach.

To attach the debugger to a running process from a command line, enter the following command:

ngaix.gif (1051 bytes)idebug -a<process_id>

ngwin.gif (1069 bytes)idebug -a<process_id> <full_path_to_executable>

where <process_id> is a valid process id on your system and <full_path_to_executable> is the full path name to the executable associated with process id you want to attach.

Important: Do not attach to operating system processes or to the debugger's own process. Attaching to such processes can cause unpredictable results.

If you are currently debugging a process, that process is terminated when the new process is attached. When you exit the debugger, any attached process is also terminated.

You cannot restart a program that you have attached to.

ngrelc.gif (533 bytes)
ngaix.gif (1051 bytes)ngwin.gif (1069 bytes)When to attach

ngrelt.gif (466 bytes)
ngaix.gif (1051 bytes)ngwin.gif (1069 bytes)Attaching to a remote running process
ngjava.gif (225 bytes) Attaching to a running Java Virtual Machine

ngrelr.gif (548 bytes)
idebug command