DotNet Weekly

A free weekly newsletter on .NET latest

Pulled together by the Dream Team Bill Stavroulakis, Ioannis Panagopoulos, Marita Paletsou
Every Tuesday. We do not share your email and we keep it safe! No spam, promise!

7 Ways to Look at the Values of Variables While Debugging in Visual Studio

When you are running your code and something is behaving unexpectedly, how do you find out what is going wrong? When I was in school the first way I learned how to debug a wonky application was by sticking “print()” statements all over the place, running my code, and looking back through the log of output seeing if I noticed that something looked wrong. Then if I wanted to look at the value of another variable I would have to add a new “print()” statement, recompile, and re-run the application again. This can be a tedious process, so I am pleased to tell you there is a better way than littering your code with a slew of “print()” statements you’ll have to remove later. You can use the tools of the Visual Studio debugger to inspect variables on the fly.

Related .NET Links