background image
<< Debugger - Viewing the call stack | Debugger - Running, resetting, and terminating execution >>
Debugger - Evaluating expressions
<< Debugger - Viewing the call stack | Debugger - Running, resetting, and terminating execution >>
User's Guide
7 U
Evaluating expressions
If a variable is uninitialized, SilkTest labels it "<unset>." If a variable has a
complex value, like an array, SilkTest might need to display its result in
collapsed form. Use View/Expand Data and View/Collapse Data (or double-
click on the plus icon) to manipulate the display (this was done in the
preceding figure, which shows a record).
Tip To return to the script being debugged, press F6 or select View/
Module and select the script from the displayed list.
Setting variables
While viewing variables, you can also change their values to test various
Procedure To change the value of an active variable, select the variable and
type its new value in the Set Value field.
When you resume execution, the new values will be used.
Viewing a list of modules
Procedure To see a list of modules used by the script being debugged:
Select View/Module.
The View Module dialog displays a list of modules. The list includes all
the modules SilkTest loads at startup (that is, the modules loaded by, including, so you can set breakpoints in GUI
functions, window class declarations, and so forth.
Double-click on a module's name to view it in a debug window.
Evaluating expressions
When a script reaches a breakpoint, you can evaluate expressions.
Procedure To evaluate expressions:
Select View/Expression.
The Expression window is displayed.
Type an expression into the input area and press Enter to view the result.
If you type an identifier name, the result is the value that variable currently
has in the running script. If you type a function name, the result is the value
the function returns. Any function you specify must return a value, and must
be in scope at the current line.