Skip to content

Summary of GT.M Debugging Tools

Summary of GT.M Debugging Tools

The following table summarizes GT.M commands, functions, and intrinsic special variables available for debugging. For more information on these commands, functions, and special variables, see the Commands, Functions, and Intrinsic Special Variables chapters.

For more information on syntax and run-time errors during Direct Mode, see Chapter13: “Error Processing.

GT.M Debugging Tools
EXTENSIONEXPLANATION
$ECodeContains a list of errors since it was last cleared
$STackContains the current level of DO/XECUTE nesting from a base of zero (0).
$STack()Returns information about the M virtual stack context, most of which freezes when an error changes $ECODE from the empty string to a list value.
ZBreakEstablishes a temporary breakpoint, with optional count and M action.
ZCOMpileInvokes the GT.M compiler without a corresponding ZLINK.
ZContinueContinues routine execution from a break.
ZEDitInvokes the UNIX text editor specified by the EDITOR environment variable.
ZGotoRemoves zero or more levels from the M invocation stack and transfers control.
ZLinkIncludes a new or modified M routine in the current M image; automatically recompiles if necessary.
ZMessageSignals a specified condition.
ZPrintDisplays lines of source code.
ZSHowDisplays information about the M environment.
ZSTepIncrementally executes a routine to the beginning of the next line of the specified type.
ZSYstemInvokes the shell, creating a forked process.
ZWRiteDisplays all or some local or global variables.
$ZCSTATUSContains the value of the status code for the last compile performed by a ZCOMPILE, ZLINK or auto-ZLINK.
$ZEDitContains the status code for the last ZEDit.
$ZLEVelContains the current level of DO/EXECUTE nesting.
$ZMessage()Returns the text associated with an error condition code.
$ZPOSitionContains a string indicating the current execution location.
$ZPROmptControls the symbol displayed as the direct mode prompt.
$ZROutinesContains a string specifying a directory list containing the object, and optionally the source, files.
$ZSOurceContains name of the M source program most recently ZLINKed or ZEDITed; default name for next ZEDIT or ZLINK.
$ZStatusContains error condition code and location of the last exception condition occurring during routine execution.
$ZSTepControls the default ZSTep action.
$ZSYstemContains the status code of the last ZSYSTEM.