Watching variables and expressions
The Watch view lets you monitor the values of selected variables
and expressions as the application runs.
If the variable or expression is in scope, the Watch view
shows its value. Empty quotes indicate that the variable is in scope
but has not been initialized. A pair of glasses in the Watch view
indicates that the variable or expression is not in scope.

Setting variables and expressions in the Watch
view
You can select variables you want to watch as the application
runs by copying them from a Variables view. You can also set a watch
on any PowerScript expression. When you close the debugger, any
watch variables and expressions you set are saved.
Using QuickWatch
You can also add variables and expressions to the Watch view
from the QuickWatch dialog box. See “QuickWatch”.
To add a variable to the Watch view:
-
Select the variable in the Variables view.
-
Do one of the following:
-
Drag
the variable to the Watch view -
Click the Add Watch button on the PainterBar
-
Select Debug>Add Watch from the menu bar
PowerBuilder adds the variable to the watch list.
-
To add an expression to the Watch view:
-
Select Insert from the pop-up menu.
-
Type any valid PowerScript expression in the New
Expression dialog box and click OK.PowerBuilder adds the expression to the watch list.
To edit a variable in the Watch view:
-
Select the variable you want to edit.
-
Double-click the variable, or select Edit Variable
from the pop-up menu. -
Type the new value for the variable in the Modify
Variable dialog box and click OK.
To edit an expression in the Watch view:
-
Select the expression you want to edit.
-
Double-click the expression, or select Edit Expression
from the pop-up menu. -
Type the new expression in the Edit Expression
dialog box and click OK.
To clear variables and expressions from the Watch
view:
-
Select the variable or expression you want
to delete. -
Do one of the following:
-
Select
Clear from the pop-up menu -
Click the Remove Watch button on the PainterBar
-
Select Debug>Remove Watch from the menu
bar
-
To clear all variables and expressions from the
Watch view:
-
Select Clear All from the pop-up menu