Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016
 
 

attach Command

The attach command attaches dbx to a running process, stopping execution and putting the program under debugging control. It has identical syntax and identical functionality in native mode and Java mode.

Syntax

attach process-ID

Begin debugging the program with process ID process-ID. dbx finds the program using /proc.

attach -p process-ID program-name

Begin debugging program-name with process ID process-ID.

attach program-name process-ID

Begin debugging program-name with process ID process-ID. program-name can be ‐. dbx finds it using /proc.

attach -r ...

The -r option causes dbx to retain all watch commands, display commands, when commands, and stop commands. With no -r option, an implicit delete all command and undisplay 0 command are performed.

where:

process-ID is the process ID of a running process.

program-name is the path name of the running program.

For information on how to attach dbx to a running Java process, see Attaching dbx to a Running Java Application.