Changing the contents of a variable

While debugging, you can change the value of a variable.

To change the contents of a variable in the Variables view:

  1. Select the variable whose value you want to modify.
  2. If necessary, expand the variable to show its individual elements.
  3. Scroll down to the variable you want to change and right-click the variable or variable element, and choose Change Value from the pop-up menu.
    Note: If you select a variable for editing and its value field cannot be edited, the variable is a type that cannot be modified.
  4. In the Set Value dialog box, complete one of the following steps:
    1. To set the value of the variable to NULL, select the Set to NULL check box and click OK. When Set to NULL is selected, the entry field is disabled and cannot be used.
    2. To change the variable value to something other than NULL, alter the value in the field and click OK.
    If you give the variable an invalid value, a message will appear in the read-only Errors section of the dialog box. The OK button will be disabled and you will need to change the variable to a valid value or click Cancel to discard the changes.
  5. To indicate that the variable value has changed, its indicator will have a delta symbol next to it. All variables affected by the change will also have a delta symbol next to their indicators.
Alternatively, you can change the contents of a variable in the Details Pane. To do this, change the value in the Details Pane and then press Ctrl+S to save the value.
Related tasks
Inspecting variables
Using the Detail Pane

Feedback