how to edit a value in a variable (QuickWatch) in visual studio?
Obviously, one way of doing this would be to pass in a new value But Visual Studio conveniently makes it easy to change any value in memory. In fact, let’s do that with the value of sum, and make sure that it returns the correct value.
All you need to do is click on in the Value column of the auto or watch window and change the value. (You can also do this when the variable’s value pops up while hovering over a variable in the source code.)
Below are steps
The debugger must be in break mode and set break point at the line where you wnat to change value and next line as well.
2. when debug reach to the variable then take mouse on the variable and then you will see pop up with variable name and current value.
3. it also allow you to modify the value and enter new value
4. If the variable is an array or an object, a tree control appears next to the name in the Name box. In the Name column, expand the variable, if necessary, to find the element whose value that you want to edit.
5. In the row you want to change, double-click the Value column.
6. Type the new value.
Searches related to edit a value in a QuickWatch
visual studio debug view variables
can you change the value of a variable while debugging an c# application
the value could not be set please check your entry
visual studio debugger not showing variable values
(Visited 697 times, 1 visits today)