Chapter Contents |
Previous |
Next |
The Windowing Interface |
Using the Command Window |
Note:
The Keys window is used to assign debugger commands
to PF keys. For a quick look at the default command assignments, see Using PF Keys.
The Command window,
shown in The Command Window, is used to submit debugger commands. The
method is similar to the way that you submit commands in a line-mode session.
You can issue any line-mode commands after the Cdebug:
prompt and then submit the command to the debugger by pressing the ENTER key.
As the debugger executes the command, it may display output or messages about
the execution in the Log window or in one of the other windows that are described
in Types of Windows.
Using the Log Window |
As shown in
The Log Window, the Log window contains a log of commands
that are issued during the current session. It also displays output from certain
commands and some error messages. Commands that are echoed in the Log window
are those commands that are issued either in the Command window or in the
Log window. The window scroll up
and window scroll down
commands provide the capability to view
previous commands and their output. The PF19 and PF20 keys are dedicated by
default to vertically scrolling the window that contains the cursor.
Using the Status Window |
During a debugging session, control passes back and forth between your program and the debugger. See The Status Window. The Status window provides information about the current status of your debugging session, including your current location in the code. This information consists of the following:
The
point in your code at which control can be passed from your program to the
debugger is called a hook. Whenever control is passed
to the debugger, the Status window displays the location of the hook and the
reason that control was transferred. For example, in the Status window shown
in Status Window, Showing Run Scope and Command Scope,
a step
command that was issued at the entry
hook of the
getname
function caused control to be transferred
to the debugger.
The location in your program at which execution stops determines the run scope. The debugger usually uses this location to resolve any references to variables. The debugger recognizes expressions that are visible to your programs at the point where execution stops without any additional actions on your part. However, if you want to view the value of expressions that are not visible at the point in your code indicated by your run scope, you must change the scope to a new location. This new scope, which you control, is called the command scope. Status Window, Showing Run Scope and Command Scope shows a Status window that displays both a run scope and a command scope.
Status Window, Showing Run Scope and Command Scope
There are
two ways in which you can change the command
scope. The scope
command, which is described
in Command Directory,
provides the greatest control. However, if you have more than one function
in your calling sequence, you can move the cursor into the Status window and
use the PF19 or PF20 keys to change command scope. The window
scroll <> up
or window scroll <> down
commands are assigned to these keys by default. The PF19
key causes the command scope to move up in the calling sequence, and the PF20
key causes the run scope to move down in the calling sequence.
Using the Source Window |
The Source window displays your source code and highlights the line on which the debugger has stopped, as shown in The Source Window. The top border, which is always present, contains the name of the source file.(footnote 1) The first line of the window provides information that always displays the following:
The SAS/C Debugger
uses a request system that keeps track of the breakpoint and action requests that you specify with debugger commands. These requests,
which tell the debugger to interrupt program execution at a hook, are assigned
to one line or a range of lines in your source code. As shown in The Source Window, the prefix area includes
an indication of the commands that have been requested, such as break
, ignore
, on
, and
trace
. The prefix area
can also be used to issue prefix-area commands that are used to either make
or control debugger requests. Prefix-area commands are explained under Source Window.
PF7 |
window scroll source
up |
PF8 |
window scroll source
down |
PF 19 |
window scroll <>
up |
PF 20 |
window scroll <>
down |
PF 22 |
window scroll <>
left |
PF 23 |
window scroll <>
right |
<>
symbol is used as a placeholder
to specify the window in which the cursor is currently located. When you
press the PF key, the name of your current window is substituted for <>
, and the command is executed. See
Placeholders in Commands and window for additional information
about the <>
placeholder.
You must position the cursor in the Source window before
you use the PF19, PF20, PF22, or PF23 keys. However, the PF7 and PF8 keys
have been assigned window scroll
commands that
cause the Source window to be scrolled regardless of the position of the physical
cursor. These two keys are useful when your cursor is located in the Command
window and you want to scroll the source code without moving the cursor into
the Source window. See Command Directory for additional information about the window scroll
command.
The
initial scroll amount, which has a default value
of cursor, can also be set by a window scroll
command in the configuration file. A scroll amount of max
cannot be specified in the configuration file. The configuration file is
used to customize the attributes of the windowing interface. See Setting Up a Configuration File for more
information.
Note:
You can use the list
command to produce the same effect during a full-screen
session. See Command Directory for information about the list
command.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.