65.9K
CodeProject is changing. Read more.
Home

Pin Variables While Debugging in Visual Studio 2010

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.33/5 (3 votes)

Apr 28, 2010

CPOL
viewsIcon

16195

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!