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. An X in the Watch view indicates that the variable or expression is not in scope.

Figure 25-2: Watch view showing an out-of-scope variable

The sample shows the Watch tab page listing several variables and expressions. Most display values, such as the expression l i _ more < 100 equals true. However, the string variable this dot d w message title is set to an empty string, indicating that the variable is in scope but has not been initialized.

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.

StepsTo add a variable to the Watch view:

  1. Select the variable in the Variables view.

  2. Do one of the following:

    PocketBuilder adds the variable to the watch list.

StepsTo add an expression to the Watch view:

  1. Select Insert from the pop-up menu.

  2. Type any valid PowerScript expression in the New Expression dialog box and click OK.

    PocketBuilder adds the expression to the watch list.

StepsTo edit a variable in the Watch view:

  1. Select the variable you want to edit.

  2. Double-click the variable, or select Edit Variable from the pop-up menu.

  3. Type the new value for the variable in the Modify Variable dialog box and click OK.

StepsTo edit an expression in the Watch view:

  1. Select the expression you want to edit.

  2. Double-click the expression, or select Edit Expression from the pop-up menu.

  3. Type the new expression in the Edit Expression dialog box and click OK.

StepsTo clear variables and expressions from the Watch view:

  1. Select the variable or expression you want to delete.

  2. Do one of the following:

StepsTo clear all variables and expressions from the Watch view:

  1. Select Clear All from the pop-up menu