Pinning Watch Variables While Debugging Visual Studio 2010, Awesome Feature

I just have to blog about what a helpful feature this is that the VS team added in VS2010.  That is, as you are debugging, you can set a watch variable and pin it to your source code.  In previous versions, you needed to basically go through the hassle of setting conditional break points to do simple debugging or be prepared to do lots of mouse clicking.  In the latest version, all you have to do is click the little thumb tack icon and drag the variable to where you want to see it. Here is what your screen looks like.



The way I got here was to first hover over the variable I wanted to look at.


Then, expand the details and press the push pin with the red arrow pointing at it.


Pressing the push pin puts the variable on your desktop and lets you drag it where ever you want.  The other nice thing is it stays there after you close visual studio and bring it up again (for those of us that require more than one debugging session to find a problem).

A very nice feature! 

About Peter Kellner

Peter is a software professional specializing in mobile and web technologies. He has also been a Microsoft MVP since 2007. In addition, he’s a multi-course video author at Pluralsight. To read more about Peter Kellner and his experience click here. For information about how Peter Kellner might be able to help you with your project click here.

Follow me:


  1. Thanks for the update Peter. I use VS2010 all the time and I didn’t discover this feature.I guess I was so used to doing what I do every day that I’ve closed my eyes to all those new little buttons and commands that add more power.

    There should be a place to find info about all the cool stuff.


Get every new post delivered to your Inbox

Join other followers: