Trace on

Command group Flag affected Reversible Execute on client Platform(s)
Debugger NO NO NO All


Trace on ([Clear trace log])


Clear trace log If specified, the command clears the trace log


This command sends all subsequent commands to the trace log and displays the current command in the method editor. It lets you turn on trace mode at a point in a method where you suspect that there may be a problem, or some code which is difficult to follow. In trace mode, the topmost method design window is continually changed to show the command being executed. Also when in trace mode, a trace log is maintained; this contains the class name and method name in the Item column and the command line text in the Data column, for all methods which are executed in trace mode or single-stepped. Error messages, breakpoints, and so on, which occur in trace mode are also entered in the trace log. The Clear trace log option deletes all existing entries before new lines are added to the log.

The trace log window is opened and brought to top either via the Tools  menu or by the Open trace log command. This window allows the trace log to be viewed, cleared or printed, and lets you alter the maximum number of lines in the log. Double-clicking on a line in the trace log causes a method design window to be opened or brought to the top with the appropriate command displayed. If Shift is pressed when double-clicking, a new method design window is opened in preference to changing the identity of the class displayed in the existing method design window.

If the double-clicked line in the log is a field value line, the value window for that field is opened. The trace log is not adjusted when methods are modified. This means that trace log lines may point to the wrong command or no command if the class containing that method has been modified.


Open trace log
; the following lines are sent to the trace log ...
Trace on (Clear trace log)
For lCount from 1 to 5 step 1
  OK message {Sent to trace log}
End For
Trace off
; ...and the following line is not
OK message {Not sent to trace log}