Create a floating DataTip

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

Create a floating DataTip

  • Comments 9

Versions:  2010
Published:  2/3/2010
Code:  vstipDebug0006

 

Ever wanted to have one or more DataTips hang around so you didn't have have mess with QuickWatches?  Well, today is YOUR day!  Welcome to the brave new world of floating DataTips.  Here's how you do it:

  1. Enter Break Mode
  2. Put your mouse pointer over a variable in the current scope; you should see something like this:

    image
  3. Click on the pin to create a pinned DataTip:

    image
  4. Now, to make it a FLOATING tip put your mouse over the pinned tip until you see this sucker (NOTE:  it may or may not be close so you may have to look around a bit to find it):

    image
  5. The top "X" closes the DataTip, the bottom chevrons we will discuss later, right now you are interested in that pin in the middle:

     image
  6. Click it and you should finally get a floating DataTip (note the yellow color for floating DataTips):

    image

Okay, so why should you care?  Well, unlike pinned DataTips, floating DataTips don't follow the source code as you step through it.  This is particularly useful if you want to step through code and have one or more pieces of information floating in easy view:

 

image

  • Nice tip Chris, can't wait for 2010.

  • Thanks!  But I'm Zain not Chris :)

    Or you can call me "Satan Spawn" too, either way...

  • These look like they'll be handy.

    Thanks for all the tips, too. I just found out about this blog when it was mentioned on the VS blog so I read a few of the old entries. Already learned a bunch.

    Not using VS2010 yet (will wait until it's final) but looking forward to it.

  • Hey Leo :)

    Thanks for reading the blog.  Some of the tips will work in older versions of Visual Studio and I am currently entertaining the idea of including version infromation.

    Z

  • Woah, that's crazy. Do these persist across debugging sessions, or do they all go away if I stop debugging? Without trying them yet, I'm not sure if persistence would be awesome or annoying.

    Also, please do add version information! Those of us stuck in 2K5-land would really appreciate it. If you don't have time to test them all yourself, trusting the commenters and tagging after the fact would still be very helpful!

  • I posted on this a while back as it was one of my favorite new features in the IDE.  I like what you guys are doing in the debug/trace space and how the navagation between critical elements continues to improve.

    Making the code a first-class participant in the debug session is a very good move.

    Cheers,

    -jc

  • Hey Marc :)

    They DO presist across debugging sessions.  They did this feature up pretty well.  As for version information it does increase the workload quite a bit but probably worth it.

    Z

  • Hi, fantastic tip guys. Is there any way to print the texts add in these tips? Or any window to read all tips?

    How can I remove all text tips, like Remove All tips?

    Thanks,

    Renato Haddad

  • Renato,

    There is no current way to print all the datatips or a window to read them as far as I know.  There IS a way to remove all tips however and I have a tip coming out on March 3rd that shows how to do this.  For now though here is the menu path to make it happen:

    Debug -> Clear All DataTips

    Z

Page 1 of 1 (9 items)
Leave a Comment
  • Please add 2 and 1 and type the answer here:
  • Post