Previous Page | Next Page

The SCL Debugger

WATCH



Suspends program execution when the value of a specified variable has been modified
Abbreviation: W

Syntax
Details
Examples
See Also

Syntax

WATCH <entry-name\> variable <AFTER count> <WHEN clause | DO list >

entry-name\

is the name of the entry that contains the variable to be watched. The debugger starts watching the variable at the first executable statement in the program in the specified entry. If the entry resides in the current catalog, then entry-name can be a one-level name. If the entry resides in a different catalog, then entry-name must be a four-level name, and the entry must already be loaded into the application's execution stack. A backslash must follow the entry name.

variable

is the name of the variable to watch.

AFTER count

specifies the number of times for the value of the variable to be changed before the debugger suspends program execution. Therefore, for an AFTER specification of 3, the program halts when the value of the watched variable is changed for the third time.

WHEN clause

specifies an expression that must be true in order for the command to be executed. Clause can contain SCL functions.

DO list

contains one or more debugger commands to execute. Use semicolons to separate multiple commands.


Details

The WATCH command monitors a variable and suspends program execution when the value of the variable is modified. A variable is called a watched entry parameter if it is defined as both a watched variable and as an ENTRY statement parameter. A program is not suspended when the value of a watched entry parameter is changed by a called program. However, a program is suspended when a changed value for a watched entry parameter is copied back to the calling program.

Each time the variable is modified, the debugger

You can watch only variables that are in the current program.


Examples


See Also

BREAK

DELETE

LIST

TRACE

Previous Page | Next Page | Top of Page