Visual Studio Tip: Change Variable Values in Place While Debugging

I know enough not to go down to the Immediate Window and type ? variablename to get the value of a variable.

I didn't know this, but I should have (or if I did know once, I've forgotten). When debugging, I know enough not to go down to the Immediate Window and type ? variablename to get the value of a variable. Instead, when stopped at a breakpoint, I just hover my mouse over the variable to have a tooltip appear with the name of the variable and the variable's current value.

What I didn't know (or had forgotten) was that I can also swing my mouse over to the value in the tooltip and click on it to change the value. That's much easier than going down to the Immediate Window to type in an expression that changes the variable's value.

If, of course, I remember this…

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • Data Science Pack for VS Code Bundles Python, Data and Copilot Tools

    New extension pack bundles wildly popular tools for Python development, assisted by the AI-powered GitHub Copilot and a data wrangler.

  • Lessons Learned Building a GenAI-Powered App

    Sometimes, complex technical achievements are best explained through one example. That's the approach Mete Atamel, Developer Advocate at Google, is taking as he makes the rounds detailing the capabilities of Vertex AI and associated tooling on the Google Cloud Platform.

  • 30th Annual Visual Studio Magazine Reader's Choice Awards Announced

    For the 30th year in a row, Visual Studio Magazine readers have chosen the best tools and services for developers. The 2024 winners are honored in 43 categories, from component suites to testing tools to AI helpers.

  • Another Report Weighs In on GitHub Copilot Dev Productivity: πŸ‘Ž

    Several reports have answered "yes" to the question of whether GitHub Copilot improves developer productivity. A new one says "no."

Subscribe on YouTube