Neat VS10 Feature: Pinning A Debugger Watch

I was stepping through some code in a debugger today and noticed a neat little feature of Visual Studio 2010 that I hadn’t noticed before.

When debugging, you can easily examine the value of a variably by highlighting it with your mouse. Nothing new there. But then I noticed a little pin next to it, which I’ve never seen before.

debugger-value

So what do you see when you see a pin? You click on it!

pinned-quick-watch

As you might expect, that pins the quick watch in place. So now I hit the play button, continue running my app in the debugger, and the next time I hit that breakpoint:

pinne-watch-changed

I can clearly see the value changed since the last time. I think this may come in useful when walking through code as a way of seeing the value of important variables right next to where they are declared. I thought that was pretty neat.

What others have said

Requesting Gravatar... Hilbert V Nov 06, 2009 5:15 PM
# re: Neat VS10 Feature: Pinning A Debugger Watch
That's really a neat feature..! Very Handy during Debugging..! :)
Requesting Gravatar... David R. Longnecker Nov 06, 2009 5:17 PM
# re: Neat VS10 Feature: Pinning A Debugger Watch
Hah, that's freaking sweet. Been using 2010 since B1, but haven't noticed the pin. Thanks for pointing (lame pun intended) it out! :D

What do you have to say?

(will show your gravatar)
Please add 7 and 7 and type the answer here: