GT.M provides a number of debugging features, many of them through language extensions.
These features include the ability to:
Interactively execute routines using M commands.
Display lines that may contain errors using the ZPRINT command and the $ZPOSITION special variable.
Redisplay error messages using the $ZSTATUS special variable and the ZMESSAGE command.
Set breakpoints and actions to bypass an error using the ZBREAK command.
Execute a line at a time using the ZSTEP command.
Display information about the M environment using the ZSHOW command.
Modify the invocation stack with QUIT and ZGOTO.
Incrementally add or modify code using the ZLINK and ZEDIT commands.
Continue execution using the ZCONTINUE command.
The following table summarizes the GT.M language extensions that facilitate debugging.
GT.M Debugging Tools |
|
EXTENSION |
EXPLANATION |
ZBreak |
Establishes a temporary breakpoint, with optional M action and/or activation count. |
ZCOMpile |
Invokes the GT.M compiler without a corresponding ZLINK. |
ZContinue |
Continues routine execution from a BREAK. |
ZEDit |
Invokes a VMS editor. |
ZGoto |
Removes zero or more levels from the M invocation stack and, optionally, transfers control. |
ZLink |
Includes a new or modified M routine in the current M process, automatically recompiling it if necessary. |
ZMessage |
Signals the specified condition. |
ZPrint |
Displays lines of source code. |
ZSHow |
Displays information about the M environment. |
ZSTep |
Executes a routine incrementally to the beginning of the next line of the specified type. |
ZWRite |
Displays all or some of the local or global symbols. |
$ZCSTATUS |
Holds the status code value for the last compilation performed by a ZCOMPILE command. |
$ZEDit |
Contains the status code for the last ZEDit. |
$ZJOBEXAM() |
Performs a ZSHOW "*" to a default file location and name, or the one optionally specified by the argument. |
$ZLEVel |
Contains the current level of DO/XECUTE nesting. |
$ZMessage() |
Translates an error condition code into text form. |
$ZPOSition |
Contains a string indicating the current execution location. |
$ZPROmpt |
Controls the direct mode prompt. |
$ZSOurce |
Contains the name of the most recently ZLINKed or ZEDITed M source program; provides the default name for next ZEDIT or ZLINK. |
$ZStatus |
Contains error condition code and location of the last exception condition occurring during routine execution. |
$ZSTep |
Controls the default ZSTep action. |