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

Why Use the DEBUG Commands?
Debugging an NCL Process
9–2 106160 Tandem Computers Incorporated
For the complete syntax of NonStop NET/MASTER MS commands, refer to the
NonStop NET/MASTER MS Command Reference Manual.
Why Use the DEBUG
Commands?
Why would you want to use the DEBUG commands to debug an NCL process rather
than another debugging technique? What advantages do the DEBUG commands offer
when trying to find the bug(s) in an NCL process? Advantages offered by the DEBUG
commands include the ability to:
Debug interactively
Debug different types of NCL processes
Display decompiled source code
Use breakpoints to suspend execution
Display and modify variables
Continue execution of an NCL process
Log debug messages selectively
Load an external procedure before execution
Obtain stack trace information
Stop a debug session
Note While you are debugging, you may find it useful to review the DEBUG commands you have used and the
results of those commands by using the recall buffer, which is associated with each OCS window. Refer
to the NonStop NET/MASTER MS Operator’s Guide for more information on using the recall buffer.
Debugging Interactively The main debugging advantage offered by the DEBUG commands is that the
commands are interactive. Using the DEBUG commands allows you to control the
execution of an NCL process and dynamically alter your debugging plan during
execution.
Interactive debugging allows you to enter DEBUG commands from the OCS command
input line and to view the results of the command in the OCS window. It means you
do not need to include, and subsequently remove, NCL statements such as SAY and
WRITE to display debug messages during execution. Nor do you need to include
NCL statements such as DELAY and PAUSE to delay execution while you are
examining the debug messages or source code.
If interactive control over the execution of an NCL process were not available, your
debugging sequence would follow these steps:
1. Edit your source code, adding statements that display debug messages in the OCS
message display area or pause execution at a certain position.
2. Execute the NCL procedure.
3. Examine the debug messages from the NCL process.