Modifying the Value of a Variable or Contents of a Register
Home Page (Debugger)  |  Overview  |  How Do I... Topics  
When the program is paused at a breakpoint or between steps, you can change the value of any non-const variable or contents of any register (including Intel MMX registers).  
What do you want to do?
Modify the value of a variable or contents of a register using QuickWatch 
Modify the value of a variable or contents of a register using the Watch window 
Modify the value of a variable in the Variables window 
To modify the value of a variable or contents of a register using QuickWatch 
- 
On the Debug menu, click QuickWatch.
 
 
- 
In the Expression text box, type the variable or register name.
 
 
- 
Click the Recalculate button.
 
 
- 
If the variable is an array or object, use the + box to expand the view until you see the value you want to modify.
 
 
- 
Use the TAB key to move to the value you want to modify.
 
 
- 
Type the new value, and then press ENTER.
 
 
- 
Click Close.
Tip   To change the value of an array, modify the individual fields or elements. You cannot edit an entire array at once.
To modify the value of a variable or contents of a register using the Watch window
- 
In the Watch window, double-click the value.
– or – 
Use the TAB key to move the insertion point to the value you want to modify. 
- 
If the variable is an array or object, use the + box to expand the view until you see the value you want to modify.
 
 
- 
Type the new value, and press ENTER.
To modify the value of a variable in the Variables window
- 
In the Variables window, click the Auto tab, Locals tab, or This tab.
 
 
- 
Select the line containing the variable whose type you want to modify.
 
 
- 
If the variable is an array or object, use the + box to expand the view until you see the value you want to modify.
 
 
- 
Double-click the value, or use the TAB key to move the insertion point to the value you want to modify.
 
 
- 
Type the new value, and press ENTER. The new value appears in red.