Feedback

  • Contents
 

Viewing the Value of a Variable While Debugging

By default, the Debug palette appears at the bottom of the window at the start of a debugging session. The first tab on this palette is the Watch Variables tab. This window displays the values of watch variables throughout the debugging session and also gives you the option to have the handler pause whenever the value of one of the watched variables changes.

When the value of a watched variable changes, the background color changes for that variable in the watch window.

When the debugging session is first started, the watch window is empty. There are several ways to add variables to it:

  • You can drag variables into the Watch window directly from the Variables palette. Simply select the variable or variables you want to monitor from the Variables palette and drag them into the Watch palette.

  • You can also add variables to the Watch window from the Variables palette by right-clicking on them and selecting "Add Selected Variable(s) to Watch Window."

  • You can add variables by clicking the "< Click to Add >" entry in the listview. When this is done, a combo box appears from which users can select the variables they want to watch.

  • Users can right-click on the watch window itself to display a pop-up menu that allows them to add variable watches. Select the Add menu item to display the drop-down combo box from which users can select the variables they want to add.

You can add, change, or remove watch variables from the watch window by right-clicking them and selecting the appropriate option from the pop-up menu.

If the watch variable value is too large to fit in the Value column, users can click on values displayed in the Value column to display the value in the Variable Value Details View dialog.

When viewing the value of a native type variable (i.e., String, Integer, Boolean, DateTime, Numeric), users can dynamically update the value of the variable while debugging on this Details Window. By default, the dialog creates an expression for the variable when the dialog is displayed. If the user wants to change the value of the variable, they can do so in the expression editor control and then click on the Set Value button.

Note: setting the value of a variable is only supported for native type variables in a debug session.

When execution is paused on the initiator in a debug session, handler variable values will have their initial values set. This is because it is the execution of the initiator step that assigns the initiator output values to the handler variables. All parameters passed in to a subroutine (either input only or input/output) are assigned after the subroutine initiator runs.

Related Topics

Call Stack

Debug a handler

Debug Palette

Debugging

Handler Variables

Monitor the changes in the value of a variable in a debug handler

Setting a breakpoint

Step Variables

Stop the debugger

Watch Variables