Please enable JavaScript to view this site.

A-Shell Reference

xcall MIAMEX, MX_DEBUG, opcode, dbgflg {, debugmin, debugtags, debugout, prefix}.

MX_DEBUG (MIAMEX 144) queries or sets the DEBUG control variable.

Parameters

opcode  (Num)  [in]

0 (mxop_get) to retrieve the current value of the system variable DEBUG (into the ordinary variable dbgflg), 1 (mxop_set) to set it.

dbgflg  (Num)  [in/out]

for opcode 0, returns the current value of the DEBUG control variable.  For opcode 1, supplies the new value you want to set.

prefix  (Num)  [in/out]

returns or sets the tracing prefix string (e.g. "$# $T $P"), depending on the op. Primarily used by SET.LIT.

Comments

The DEBUG control variable is useful for embedding debugging code into applications that can be enabled or disabled without modifying the programs. Other ways to modify the variable are via the SET DEBUG command or by compiling with the /DEBUG compile switch. Ways to use the variable within a program include:

IF DEBUG THEN …

IF DEBUG > N THEN …

DEBUG.OPEN              ! open System Messages window (if DEBUG variable set)

DEBUG.PRINT msg         ! output msg to debug window (if DEBUG variable set)

DEBUG.PAUSE msg         ! output msg and wait (if DEBUG variable set)

DEBUG.CLOSE             ! close System Messages window (if DEBUG variable set)

See the Event Tracing for more information on the System Messages window.

History

2023 September, A-Shell 6.5.1744: add prefix parameter to support querying and setting global tracing prefix.