


In the context menu select the option to “Show Parameter Values”.Right click on a frame in the Call Stack.It can be extra helpful to bring in additional information to orient yourself, like parameter values.

It provides history on where the code calls have happened to get into this state. Most developers use the Call Stack like a map for their current context in their debugging session. As you debug through the recursive calls, you will see them added in new rows in the windowģ.Click “” and type in the name of a variable you care about.Open the Parallel Watch window (Debug/Windows/Parallel Watch).One helper for this mental load can be to use the Parallel Watch window to see the change in the variables of the recursive call. Look at values throughout recursive function callsĭo you typically find yourself debugging recursive functions using many statements of Debug.WriteLine()? It can be hard to keep in your head how the recursion will play out. This method is most beneficial if you need to create or manipulate a variable before assigning it.Ģ. For example, you can type “x = 12 ” which would change the in-memory value of the in-scope variable x to be the number 12. In the Immediate window, you can use code syntax to reassign the variable to a new value.

The value becomes editable and you can provide a new value for the variable.Ĭ. In the Autos, Locals, or Watch windows double click on the value in the grid or right click and choose “Edit value” from the context menu. An edit cursor appears and you can provide a new value for the variable.ī. Hover over the variable to get a DataTip and then single click on the value in the table or right click and choose “Edit value” from the context menu. Edit the value of a variable without changing codeĪre you ever debugging when you get to a variable and it isn’t what you think it should be? Or maybe you just want to change it to see how the code would behave with a different value? You can easily do this while debugging simply by editing the value of the variable in memory using whichever method fits best into your flow: DataTips, the Autos, Locals, or Watch windows or the Immediate window.Ī.
