Set next statement

Today’s Tips’n’Trick is one which I value a lot. Lets say you are in the debugging session and you look at the Call Stack window to check what methods were invoked so far. You can see assembly names, method names, line numbers – even parameter types and names. But you cannot see parameter values! If you want to check what was the value of the input parameter you have to double click the line and check it’s value in Autos or Locals window. To compare values between methods you will have to jump back and forth.

But wait! There is a better way to do it. Right click in the Call Stack window and select Show Parameter Values option. Once selected, the parameter values will be displayed in the Call Stack window along with parameter names and types. This feature is extremely useful when debugging recursive functions.

If the parameter is a complex type, you can control what will be displayed by annotating the type with DebuggerDisplayAttribute.

Find other Visual Studio Debugger Tips’n’Tricks: http://www.mariuszwojcik.com/tag/Debugging