SETTRACE
Start Program Trace Mode
This directive initiates a trace of the execution of a program on a program line basis, putting out a listing of each line of program code as its execution begins.
Syntax
Section titled “Syntax”SETTRACE [(channel)]channel- is an integer in the range of 0 to 32764 indicating the channel of an OPEN file. If omitted, 0 is the default.
Remarks
Section titled “Remarks”A trace initiated by the SETTRACE directive is terminated by an END, ENDTRACE, or STOP directive.
If no channel is specified, the terminal (channel 0) receives the output listing.
If not output to the terminal, a SETTRACE is normally output to an INDEX file with a record size equal to the number of characters in one line of the terminal (80, 132, 161, etc.).
The output of this directive, when displayed at the terminal, may be temporarily halted using the Ctrl-S (XOFF) sequence and resumed using Ctrl-Q (XON) if XON/XOFF protocol is being used, or interrupted by the Escape key.
The SETTRACE directive automatically paginates traced program statements that are listed on the terminal screen by pausing and displaying a prompt at the bottom of the screen. Press Enter or the spacebar to continue tracing, Escape to go to Thoroughbred Basic Console Mode, or Ctrl-L to cancel pagination and continue the tracing. This feature is generally available starting with release level 8.1B2
A single-line trace can be performed by entering a period in Thoroughbred Basic Console Mode followed by pressing the Enter key. A single-directive trace can be performed by entering a semi-colon followed by pressing the Enter key. This feature is independent of the SETTRACE and ENDTRACE directives and is generally available starting in release level 8. For more information on these types of traces, please refer to the information on Thoroughbred Basic Console Mode in the Volume I of this manual.
Examples
Section titled “Examples”SETTRACEcauses program statements to be listed to the terminal as they are executed.
SETTRACE (2)causes program statements to be listed to the file or device OPEN on channel 2 as the statements are executed.
See also
Section titled “See also”ENDTRACE and SET TRACEMODE directives
From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF