Click here to Skip to main content
15,890,557 members
Articles / General Programming / Debugging
Tip/Trick

Pin Variables While Debugging in Visual Studio 2010

Rate me:
Please Sign up or sign in to vote.
2.33/5 (3 votes)
6 May 2010CPOL 15.8K   2   2
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)


Written By
Software Developer (Senior)
Canada Canada
For almost 30 years I have been working with computers, learning a myriad of languages and participating in various computing environments.

Though I have been mentoring other developers for the last decade, I have recently found a strong interest in writing and am learning to translate the fun of in-person teaching to something I can get into article form.

I enjoy following technology trends, new gadgets and trying to guess where innovation will lead us next (I'm kinda holding out for a robot-served utopia, but willing to submit to our future robot leaders).

I am a guy who is passionate about my faith, my family and a cure for Juvenile Diabetes (my son lives with this disease).

Comments and Discussions

 
GeneralTo the vote of 1: While I totally don't mind a low-scoring ... Pin
TheyCallMeMrJames6-May-10 8:18
TheyCallMeMrJames6-May-10 8:18 
GeneralTo the vote of 1 Pin
TheyCallMeMrJames17-Sep-10 5:02
TheyCallMeMrJames17-Sep-10 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.