NET/MASTER Network Control Language (NCL) Programmer's Guide

Debugging Guidelines
Debugging an NCL Process
106160 Tandem Computers Incorporated 9–9
8. When execution is suspended at the first, or any breakpoint, the tasks you would
normally perform are the following:
Display the current statement and, if necessary, surrounding statements by
using the DEBUG SOURCE command.
Examine the values of relevant variables by using the DEBUG DISPLAY
command and, if necessary, modify the values of variables by using the
DEBUG MODIFY command.
Start or stop the logging of debug messages to the NonStop NET/MASTER
MS activity log by using the DEBUG LOG or DEBUG NOLOG command,
respectively.
Examine stack trace information (information about nested procedures,
functions, subroutines, and error handlers) by using the DEBUG TRACE
command.
List all breakpoints in the NCL process by using the DEBUG LIST
BREAKPOINTS command, to determine whether each breakpoint is still
required.
Clear any breakpoints in the NCL process that do not appear to be required by
using the DEBUG CLEAR BREAKPOINT command.
Set any additional breakpoints in the NCL process that appear to be associated
with a bug by using the DEBUG BREAKPOINT command.
Continue to the next breakpoint.
9. Follow Guideline 8 until you think you have located the specific bug or all the
bugs for which you are searching.
10. When you think you have located the bug(s), stop your debug session by using the
following step that applies to your debugging task:
If you are debugging a specific NCL process, use the DEBUG STOP ID=ncl-id
command to stop debugging the NCL process.
If you are debugging an environment, use the DEBUG STOP ALL command to
stop debugging the environment and to terminate execution of all NCL
processes currently being debugged in the environment.
You can use the TYPE=type-specification operand of the DEBUG STOP command to
specify how to terminate the debug session. The method you choose affects the
NCL process(es) currently being debugged. You can terminate execution
immediately, allow the NCL process(es) to terminate normally, or leave the NCL
process(es) in their current state (either suspended or executing).
11. Correct the source code in the NCL procedure and test the NCL procedure, as
described in “Before Debugging an NCL Process” earlier in this section.