The SCL Debugger |
Abbreviation: | T |
Syntax | |
Details | |
Examples | |
See Also |
Syntax |
TRACE <location <AFTER count <<WHEN clause | DO list>> |
specifies where to set a tracepoint (at the current line, by default).
sets a tracepoint at every SCL executable program statement.
sets a tracepoint at the first executable statement in every entry in the current catalog that contains an SCL program.
sets a tracepoint at the first executable statement in an SCL reserved label or in a user-defined label.
is the number of times for the debugger to execute a statement before executing the TRACE command.
specifies an expression that must be true in order for the command to be executed.
contains one or more debugger commands to execute. Use semicolons to separate multiple commands.
Details |
The TRACE command sets a tracepoint at a specified statement and traces the execution of that statement.
A tracepoint differs from a breakpoint because a tracepoint resumes program execution after temporary suspension. Also, a tracepoint has a higher priority than a breakpoint. If a statement has been specified both as a tracepoint and as a breakpoint, the debugger first prints the trace message and then suspends program execution. Each time the tracepoint statement is encountered, the debugger does the following:
checks the count that is specified with the AFTER command and resumes program execution if the specified number of tracepoint activations has not been reached
evaluates any conditions specified in a WHEN clause and resumes execution if the condition evaluates as false
displays the entry name and line number at which execution is suspended
Examples |
Trace the statement at line 45:
DEBUG> t 45
Trace each executable statement:
DEBUG> t _all_
Trace each executable statement and print all the values:
DEBUG> t _all_ do; e _all_; end
Trace the first executable statement in each program:
DEBUG> t entry
Trace the first executable statement in the program's MAIN section:
DEBUG> t MAIN
Trace the statement at line 45 after each third execution:
DEBUG> t 45 after 3
Trace the statement at line 45 when the values of the variables DIVISOR and DIVIDEND are both 0:
DEBUG> t 45 when (divisor=0 and dividend=0)
Trace the statement at line 5 in the entry TEST1:
DEBUG> t test1\5
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.