Attaching to a local running process

ngaix.gif (1051 bytes)ngwin.gif (1069 bytes)Restriction: Attaching to a local running process is only supported on AIX and Windows.

Note: When you are debugging a WebSphere Application Server Enterprise Edition Series program, the Load Program dialog and the Attach menu item are not applicable.

ngjava.gif (225 bytes) Important: 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 Attach 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 a running process with the Attach dialog:

  1. Select File > Attach to invoke the Attach dialog.
  2. Select the Compiled tab.
  3. Select the Local radio button.
  4. Select the dominant language of the program.
  5. Optionally, enter the full path name to the executable associated with the process you want to attach, in the Process Path field.
  6. If you do not know the Process ID of the process you want to attach to, click Get Process List. The Process List dialog provides a list of the processes running on the local machine. Select a process in the Process Path field and click OK to close the Process List dialog.

    or

    If you know the Process ID, click the Enter Process ID radio button and enter the Process ID in the Process ID field.

  7. Click Use program profile if you want to use this feature.
  8. Click Attach to attach to the process and close the Attach dialog.

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

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

where <process_id> is a valid process id on your system.

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

ngwin.gif (1069 bytes)When you exit the debugger, any attached process is also terminated.

ngaix.gif (1051 bytes)The debugger detaches from the process on debugger exit. The Terminate button can be used to terminate an attached process. To detach without exiting the debugger, use the Detach button or select Debug> Detach from the menu bar.

You cannot restart a program that you have attached to.

ngrelc.gif (533 bytes)
When to attach

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

ngrelr.gif (548 bytes)
idebug command