You can attach a running process to dbx using the process ID as an argument to the dbx command or the dbxtool command.
$ dbx programname process-ID
or
dbxtool program-name processD
To attach dbx to a running process that includes Java 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 - processID
or
$ dbxtool - processID
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.