|Using Debugger Commands|
This section describes
subcommands, how to issue commands, and how placeholders are used in debugger
|Window Operations and Window Subcommands|
This section explains
commands that are issued outside the PROFILE and configuration files. See Debugger PROFILEs, Configuration Files, and EXECs for information
window command in a PROFILE or configuration
window command is
used to perform a variety of window functions: clearing windows, closing
windows, moving windows, opening windows, resizing windows, scrolling windows,
and so on. Each of these functions is performed by a subcommand of the
window command. For example, to use the
source up subcommand, you type
scroll is a subcommand
On completing its execution of most window-oriented commands, the debugger does not move the cursor out of the window. Therefore, the following commands, which are issued when the debugger is running, are useful when they are assigned to PF keys:
||automatically pops (unobscures) the window when updated.|
||specifies the characters used to form window borders.|
||clears the named window.|
||closes the named window.|
||changes the color, attributes, and intensity of various areas in a window.|
||controls the amount of context information around the highlighted line in the Source window.|
||moves the named window.|
||positions the top window at the bottom of the stack. The window below the window just moved becomes the top window.|
||switches the debugger to line mode.|
||switches the debugger to full-screen mode.|
||opens the named window.|
||positions the bottom window at the top of the stack and makes it the top window.|
||resizes (grows or shrinks) the window.|
||scrolls windows (up and down, and left and right), as well as changes the scroll amount.|
||positions the named window at the top of the stack. The physical cursor appears in this window at the place of the logical cursor. The window becomes the top window.|
||controls the production of trace lines in the Log window.|
||zooms the named window. If already zoomed, the window is unzoomed.|
|* These subcommands take a window name as a parameter.|
The usual abbreviation conventions, which apply to all debugger commands, also apply to these subcommands. A complete description of each subcommand is provided in Command Directory.
|Methods of Issuing Commands|
be issued by typing them in the Command window and
pressing the ENTER key. However, this can be quite cumbersome for frequently
used commands, for example,
scroll down, and
Window commands, like most other commands, can be assigned to PF keys. See Using PF Keys for details about default PF key assignments and how they may be modified.
|Placeholders in Commands|
window subcommands and
commands that take expressions as arguments, can be assigned to PF keys using
a placeholder to indicate the position at which an argument is to be inserted.
If a command contains a placeholder, then the position of the cursor is used
to determine the value of the argument that is inserted in place of the placeholder.
Several of the
subcommands take WINDOW-NAME as a command argument. If you want to use the
cursor to point to the window, a placeholder (syntax <
>) is used in these subcommands instead of the window
The following example illustrates the use of placeholders
window subcommands. Most windows can be
scrolled back using the following command:
window scroll WINDOW-NAME up
You could assign this command to a PF key as a text string, substituting the name of a window for WINDOW-NAME. Whenever you press the assigned PF key, the window would be scrolled up. However, you can also assign the following command to a PF key:
window scroll < > up
Pressing the PF key that is assigned to this command
causes the window that the cursor is in to scroll up.
You can also use placeholders with commands that take expressions, thus simplifying the execution of frequently used expression-handling commands. One or more placeholders, < >, can be specified in a command that is assigned to a PF key. When you issue this command by pressing the PF key, you can use the cursor to point to the expression that replaces all occurrences of the placeholder in the command.
For example, the
Similarly, in an application that performs much text-string
manipulation, you may frequently issue a
dump expression str command. You can assign
dump < > str
to a PF key. Moving the cursor to an expression and pressing that PF key
would cause the debugger to replace the placeholder with the expression, and
dump the string.
Expression extraction Expressions occupying contiguous characters on one line in a window can be substituted for a placeholder in a command that is assigned to a PF key. The process of extracting an expression for substitution in a command is referred to as expression extraction. If the area of the window that contains the expression is unprotected, you can modify the expression before extraction.
The debugger uses an algorithm to identify the portion of the expression that replaces the placeholder. The rules for determining the extracted expression are described in the following section.
The debugger uses an algorithm to
extract expressions from the
surrounding text. The debugger first does a preliminary backward scan until
it encounters one of the following characters: a left parenthesis, a right
parenthesis, a left bracket, or a character that is valid in an identifier.
For debugger purposes,
is also considered to be a character
that is valid in an identifier. (If the debugger is already on such a character,
this preliminary scan is not needed.) If the backward scan cannot find one
of these characters, there is no expression to be extracted. Processing then
depends on the character that is encountered:
A backward scan now begins, either from the character in question (if it is valid in an identifier) or from the character that is before the character in question (if on a left bracket). The debugger scans over characters that are valid in identifiers, dot operators, and arrow operators. White space terminates the scan. If it encounters any right brackets in the backward scan, all text (including white space) up to the corresponding left bracket is automatically included, and the scan then resumes. Any right parenthesis that immediately precedes a dot or arrow has the result that all text up to the corresponding left parenthesis is automatically included. The position at which the scan terminates marks the start of the expression to be extracted.
A forward scan is done next from the tentative end to obtain the actual end of the expression to be extracted. If the tentative end was a left bracket, the forward scan ends at the corresponding right bracket; otherwise, the rest of the identifier is scanned.
Placeholder Expression Extraction illustrates how the expression to be extracted depends on cursor position. When you read the table, assume the cursor is at the position shown in the expression in the first column. The third column shows the extracted text. The examples illustrate what would happen if the cursor were in one of several positions. In those cases, the cursor appears somewhere within the range indicated by the text shown in the second column of Placeholder Expression Extraction.
|Window Text||Cursor Position (table note 1)||Extracted Text|
TABLE NOTE 1:
All of the ranges listed in the Cursor Position
column include a leading blank
space except for
pntr. Placing your cursor in the leading blank returns the extracted
text the same as placing your cursor within the rest of the range.
As shown by Placeholder Expression Extraction, arbitrary expressions may be extracted by surrounding them with parentheses.
When the cursor is moved under the expression that is to replace the placeholder, and one of the methods described in Methods of Issuing Commands is used to execute the command, the debugger extracts the expression and substitutes it for the placeholder in the command being issued.
The algorithm used by the debugger to extract expressions does not handle numeric constants; positioning the cursor on numeric constants may lead to unpredictable results. However, numeric constants can be specified as part of an expression enclosed in parentheses.
Top of Page
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.