Sun Studio 12 Update 1: Debugging a Program With dbx

Using the Process ID

You can attach a running process to dbx using the process ID as an argument to the dbx command or the dbxtool command.

$ dbx program_name process_id


dbxtool program_name process_id

To attach dbx to a running process that includes JavaTM code and C JNI (Java Native Interface) code or C++ JNI code:

$ dbx program_name{.class | .jar} process_id

You can also attach to a process using its process ID without knowing the name of the program.

$ dbx - process_id


$ dbxtool - process_id

Because the program name remains unknown to dbx, you cannot pass arguments to the process in a run command.

For more information, see Attaching dbx to a Running Process.