COBOL Manual for TNS and TNS/R Programs
Executing and Debugging HP COBOL Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
25-15
Getting a Program to Enter Debugging Mode
Getting a Program to Enter Debugging Mode
You can get a program to enter debugging mode (that is, to enter the debugger for
which you compiled the program) at any of these times:
•
Before Execution
•
During execution:
°
Programmatically
°
Forcefully
For information on specific debuggers, see Section 15, Debugging Tools.
Before Execution
To have an ordinary HP COBOL program (as opposed to one that is a Pathway server)
enter debugging mode before executing any instructions, start it with the RUND
command instead of the RUN command. Use the same options that you would use
with the RUN command (see Executing an HP COBOL Program).
To have a Pathway server enter debugging mode before executing any instructions,
use the PATHCOM command SET SERVER DEBUG ON. For considerations
regarding errors that can occur when you are debugging a Pathway server, see the
TS/MP Pathsend and Server Programming Manual.
Programmatically
To cause a program to put itself into debugging mode, put this statement at the point in
the program where you want to start debugging:
ENTER "DEBUG"
The process prompts you for debugging commands at its home terminal.
Forcefully
To force an HP COBOL program to enter debugging mode while it is executing, use the
TACL command DEBUG. If you do not have a TACL prompt on your terminal (because
you are not running the HP COBOL program in the background), press Break to get a
TACL prompt. If you include the TERM option in the RUN command with which you
start your program, you can debug the program from a terminal other than the one the
program is running on.