Setting up socket shell mode for GUI debugging

dbx supports two shells: the command-line shell and the socket shell (GUI). Since the command-line shell is the default setting, the following will show you how to set up and use the socket shell.

Restriction: Once in the socket shell, the dbx command-line mode is no longer available. However, output for the program, such as stdout, will operate the same as in dbx command-line mode. In other words, the program dbx is debugging can still write to the terminal.

Requirement: Before you can set up socket shell mode, the GUI that dbx connects to needs to be running and listening on a port. This must be done prior to starting dbx. Also, the port number set in the GUI must be the same as the port number set by the -p option on the dbx command, which initiates a GUI session.

To set up the socket shell, enter the following at the shell prompt: dbx -p hostName[:port] or dbx -p ipdaddress[:port] , where :port is an optional operand. This will put dbx into socket shell mode. Once in this mode, dbx will connect to the specified port on the given machine. After connecting, all communications and operations with the dbx engine will be driven by the remote GUI debugger.

See the following example:
dbx -p mymachine.example.com myprogram

dbx -p 192.168.0.1:8001 myprogram
Note: The default port that dbx uses to communicate with the remote GUI debugger is 8001.
You can also debug a program by attaching to it. To do this, start dbx with the following arguments:
dbx -p mymachine.example.com -a 1234567
where 1234567 is the process ID of the program to be debugged.
You can debug dumps using the remote GUI debugger. To do this, start dbx with the following arguments:
dbx -p mymachine.example.com -C abend.dmp

Once the GUI debugger has finished debugging, the dbx session is ended, and control returns to the z/OS UNIX shell. To initiate a new debugging session, the dbx command must be executed again.