Previous Topic Next topic Print topic


% SET TRACE

Trace the generation execution of selected segments of rule source code, and produce a detailed execution log. You can turn tracing features on and off in different sections of rule logic. This ability to selectively debug reduces the volume of debug output. % SET TRACE traces all variables; you can use % SET WATCH to trace individual variables.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax:

% SET TRACE [option, option, ...]

Parameters:

[NO]UNP

Aliases: UNPARSE, SRC, SOURCE, NOUNPARSE, NOSRC, NOSOURCE

Trace, or do not trace, each following statement.

% SET TRACE UNPARSE writes each statement to the log as it executes. The statement is actually reconstituted (or UNPARSED) from the internal compiled AST form.

[NO]VARIABLES

Alias: VARS, NOVARS

Write, or do not write, variable values, that the generator either accesses or updates, to the log.
[NO]EVALMESSAGES

Aliases: EVALMESS, EVAL, NOEVALMESS, NOEVAL

Write, or do not write, the result of evaluation expressions to the log.
[NO]LASTSTMTS|ALL|NONE

Alias: LAST, NOLAST, ON, OFF

Turns off, or turn off, the continuous trace recording of the results from UNPARSE, EVALMESS and VARS trace.

% SET TRACE LAST is very useful when you encounter an infinite loop or an severe error. It records the last 50 statements and variable values executed and writes them to the log when the MFG terminates from an exception, from the user pressing Ctrl+Break, or from a % SET FATAL.

ALL|NONE Activates, or deactivate, all trace options.
INFO Trace back the % SET ERROR, FATAL, WARNING, INFO messages. This function is for upward compatibility. We recommend that you use % SET TRACEBACK INFO instead.
NOINFO

Aliases: Noinfo, noinfo

Trace back the % SET ERROR, FATAL, WARNING, INFO messages. This function is for upward compatibility. We recommend that you use % SET TRACEBACK INFO instead.

Comments:

  • To deactivate % SET TRACE, code % SET NOTRACE.
  • To trace the generation execution of an entire rule instead of just selected segments, enter /TRACE on the command line.
  • We recommend that you use % SET TRACE and % SET WATCH only as debugging aids, not in production applications, because they impose a considerable overhead on execution efficiency.
  • In previous versions, % SET TRACE limited the rule call traceback function that accompanied the % SET INFO and % SET message statements.% SET TRACEBACK now performs that function, although you can still use % SET TRACE to do it.
Previous Topic Next topic Print topic