Click here to Skip to main content
11,479,034 members (61,964 online)
Click here to Skip to main content

Tagged as

Pinning the variables/expressions while debugging

, 1 May 2010 CPOL 5.1K 1
Rate this:
Please Sign up or sign in to vote.
This feature may not seem useful initially, and might appear distracting you. But it is one of the very useful (new) features in Visual Studio 2010. You'll love it after using it for a while!While debugging, you typically put some variables in Watch Window (or use Locals, Autos etc). When...
This feature may not seem useful initially, and might appear distracting you. But it is one of the very useful (new) features in Visual Studio 2010. You'll love it after using it for a while!

While debugging, you typically put some variables in Watch Window (or use Locals, Autos etc). When you keep adding expressions/variables in Watch window, this list goes large and becomes clumsy, unreadable.

With DataTips, you can place variables or expressions as a floating content. It would appear the same way when you hover mouse over a variable - as a tooltip. But when you move mouse away from variable, the tooltip goes away.

When you add the expression using DataTips, it would remain there. You can also move it anywhere - just like any window.

How to pin?

Just hover over a variable, or select the variable/expression. Then click the pinning button on right of tooltip. The DataTip is added!
The DataTip may be:
  • Pinned to Source
  • Unpinned from source
If Pinned to Source, the DataTip would appear only if code (program) goes to relevant function/block. It will not appear otherwise.

The DataTip would always appear, if not pinned to source.

To Pin to Source, just click on variable/expression, right click and select 'Pin to Source'.

I cannot quite understand (as of now), how VS selects Source-pinning/unpinning of we add it by hovering and adding. Sometimes it Pins to source, sometime it doesnt.

But in both approaches, the DataTip appears as floating content. You can change the source-pinning behavior by clicking the middle of the DataTip shown.

License

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

Share

About the Author

Ajay Vijayvargiya
Software Developer (Senior)
India India
Started programming with GwBasic back in 1996 (Those lovely days!). Found the hidden talent!

Touched COBOL and Quick Basic for a while.

Finally learned C and C++ entirely on my own, and fell in love with C++, still in love! Began with Turbo C 2.0/3.0, then to VC6 for 4 years! Finally on VC2008/2010.

I enjoy programming, mostly the system programming, but the UI is always on top of MFC! Quite experienced on other environments and platforms, but I prefer Visual C++. Zeal to learn, and to share!

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 1 May 2010
Article Copyright 2010 by Ajay Vijayvargiya
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid