The ZBREAK command sets or clears routine breakpoints during debugging.
The format of the ZBREAK command is:
ZB[REAK][:tvexpr] [-]entryref[:[expr][:intexpr]][,...]
The optional truth-valued expression immediately following the command is a command postconditional that controls whether or not GT.M executes the command.
The required entryref specifies a location within a routine at which to set or remove a breakpoint.
The optional minus sign (-) specifies that ZBREAK remove the breakpoint; -* means remove all breakpoints.
The optional expression specifies a fragment of GT.M code to XECUTE when GT.M execution encounters the breakpoint; if the ZBREAK argument does not specify an action, the default action is "BREAK".
The optional integer expression immediately following the expression specifies a count of process transits through the breakpoint before the breakpoint action takes effect; once GT.M exhausts the count and the action takes effect, the action occurs every time the process encounters the breakpoint. If the action expression is omitted, the optional integer expression must be separated from the entryref by two adjacent colons (::).
An indirection operator and an expression atom evaluating to a list of one or more ZBREAK arguments form a legal argument for a ZBREAK.
When GT.M encounters the entryref, GT.M suspends execution of the routine code and XECUTEs the breakpoint action before executing any of the commands on the line. For more information on entryrefs, refer to the "General Language Features of M" chapter in this manual.
When the optional integer expression is used, GT.M activates the breakpoint on the intexpr-th time the process encounters the breakpoint during routine execution. Once GT.M activates the breakpoint, that breakpoint remains active for the process until explicitly replaced or removed, or until the process terminates.
For more information, refer to "Operating and Debugging in Direct Mode" chapter in this manual.