Using the COBOL-IT Debugger
>cobcdb [options] [program name] [command-line parameters]
Command-line parameters
Commmand-line parameters are parameters which would be returned to the program through an ACCEPT
from COMMAND-LINE
statement.
Program name
Program name is the name of the shared object file created by the COBOL-IT Compiler (.dll
, .so
).
Options
Options are parameters that are passed to the COBOL-IT Debugger. These options include:
-listdid
Causes the COBOL-IT Debugger to list all the running processes by PID
, as well as debug-id.
As an example:
C:\COBOL\COBOLIT>cobcdb -listdid
did: -------- pid: 11412 module:
did: -------- pid: 11956 module:
did: 12345 pid: 11536 module: hello
did: -------- pid: 3296 module:
did: -------- pid: 3324 module:
-n
(Windows only). Causes the COBOL-IT Debugger to start the execution of program name in a new cmd.exe
window.
-p <did>
Causes the COBOL-IT Debugger to connect to the running process identified by did
(the debug-id). did
may be a debug-id, set with the runtime environment variable COB_DEBUG_ID
, or it may be the process id (pid
) of the currently running process.
When using the -p
did parameter, there is no need to specify program name, as the program is identified by did
.
-r host:port
Connects two TCP sockets to host:port
. The Debugger commands, and the results returned are transmitted via these sockets. This is used by the Remote System Explorer in the COBOL-IT Developer Studio.
Sockets are identified by the first line sent.
Socket1
is used to exchange Command/Result information. As an example, the COBOL-IT Debugger will READ
Commands Socket1, and WRITE
the results of the command to that socket.
Socket1
is identified by command:pid\n
where pid
is the process-ID.
Socket2
is used to write Debugger Events. For more information see Debugger Events.
Socket2
is identified by event:pid\n
where pid
is the process-ID.
-trace
Causes the COBOL-IT Debugger to write tracing information to cobcdb.out.
-w <did>
Causes the COBOL-IT Debugger to interrupt the process identified by did and set it into a “wait for connect” state. did
is the debug-id. Did
may be a debug-id, set with the runtime environment variable COB_DEBUG_ID
, or it may be the process id (pid
) of the currently
running process. A program that has been set into this state can be debugged with the –p did
command. When using the -w did
parameter, there is no need to specify program name, as the program is identified by did
.
-y tty
(UNIX/Linux only). Causes the COBOL-IT Debugger to assign stdout
/stdin
/stderr
to tty
. When running the COBOL-IT Debugger with –y tty
, a program name is required.