|SAS Component Language: Reference
following sections briefly describe the commands that are available in the
SCL debugger. For detailed information about a command, see its corresponding
dictionary entry later in this chapter.
|Controlling Program Execution|
While you are in
a debugger session, you can use the following
commands to monitor the flow of the program and even to change the way the
- continues program execution until a specified
statement or until the next breakpoint (if any) or program is
- restarts program execution at a specified
executable statement. This command causes the interpreter to bypass execution
of any intermediate statement.
- steps through the program statement by statement.
By default, the ENTER key is set to STEP.
|Manipulating Debugging Requests|
debugger commands enable you to set breakpoints,
tracepoints, and watched variables, which you can then use to suspend or trace
the execution so that you can further manipulate the program variables. Whenever
a debugging request is set, it remains in effect until you use the DELETE
command to delete it.
- sets a breakpoint at a particular executable
program statement. When a breakpoint is encountered, execution of the program
is suspended and the cursor is placed on the DEBUG prompt line in the debugger
- removes breakpoints, tracepoints, or watched
variables that were previously set by the BREAK, TRACE, and WATCH
- displays all the breakpoints, tracepoints,
and watched variables that have been set by the BREAK, TRACE, and WATCH
- sets a tracepoint. When a tracepoint is
encountered, the debugger prints the information in the debugger MESSAGE window
and continues processing.
- sets a watched variable. If the value of
the watched variable is modified by the program, the debugger suspends execution
at the statement where the change occurred, and it prints the old and the
new values of the variable in the debugger MESSAGE window. This command is
especially useful in large programs to detect when the value of a particular
variable is being modified.
execution is suspended, the debugger allows you
to examine the values and attributes of variables. If the value of a variable
would result in a logic error, you can then modify it so that you can continue
the debugging session. Use these commands to manipulate SCL variables from
- displays the values of arguments that are
passed into the current program through the ENTRY statement.
- acts as an online calculator by evaluating
expressions and displaying the result. This is useful when you try to set
the value of a variable to the result of an expression. You can use SCL functions
and dot notation in CALCULATE expressions.
- displays the name, type, length, and class
attributes of a variable.
- displays the values of one or more variables.
You can use SCL functions with EXAMINE. You can also use dot notation to display
values of object attributes and values that are returned by methods.
- displays the values of parameters that you
are passing if the next executable statement contains a function
- displays the contents of an SCL
- changes the value of a variable in the SCL
program. This enables you to continue the debugging session instead of having
to stop, modify the source, and recompile the program. You can also assign
new values to variables in other active entries.
|Expanding Macros and Macro Variable References|
program execution is suspended, the debugger can expand
macros and macro variable references.
- displays expanded macro invocations and
macro variable references. The text of the macro or the value of the macro
variable is displayed in the debugger window.
The following commands
manipulate the debugger windows:
- enables you to set a developer environment
by redisplaying the source of any program in the execution stack. When a
developer environment is set, the debugger generates messages that show you
what the current program environment and the developer environment are. You
can then scroll through the source program, set debugging requests, and operate
on the variables.
- displays information about debugger
- terminates a debugger
- switches control between the debugger SOURCE
and MESSAGE windows.
- displays the execution stack, which contains
information about which entries are running.
|Customizing the Debugger Session|
following commands enable you to customize your debugging
- enables you to assign one or more frequently
used commands to the ENTER key. The default for ENTER is STEP, which steps
through the program statement by statement.
- enables you to conditionally execute other
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.