Alex Rivera | Logout

Is it possible to change the value of a variable during execution time?

Asked 2010-06-04T08:14:13.030
50

I want to know if there is any way I can change the value of a variable during execution time, using Visual Studio 2008? I know I can do this on Eclipse (put a breakpoint, add a watcher and edit whatever variable value I want) but I didn't find this feature on VS yet?

Any idea?

Thanks.

Edit
Report

1 Answer

4

You can do this as follows:
1. Put a breakpoint just after the line of code where you want to update the varaible value.
2. Run the application till the breakpoint is hit.
3. Just hover over the variable you want to edit and the varable name and value will be shown.
4. Click on the Value field and edit it, press enter.

Mission accomplished...

answered 2010-06-04T08:21:29.973

Your Answer