Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / programming / debugging

Pin Variables While Debugging in Visual Studio 2010

2.33/5 (3 votes)
6 May 2010CPOL 1  
When you hover over a variable with the debugger running you will see a thumbtack that allows you to pin the variable to the editor window. This is cool for a number of reasons.1) It is much easier to see changes to a set of variables in any kind of a loop construct. You can even pin...
When you hover over a variable with the debugger running you will see a thumbtack that allows you to pin the variable to the editor window. This is cool for a number of reasons.

1) It is much easier to see changes to a set of variables in any kind of a loop construct. You can even pin members of the objects to the window, so you're not limited to the top-level of the variable in question.

2) You can add comments to the pinned variables.

3) The last captured value as well as your comments are persisted and available after your debug session and back into code-editing mode.

These are some extremely useful additions to the debugging experience in VS2010 and some of the fruits of switching the editor over to WPF.

Cheers!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)