Search code examples
visual-studio-2010keyboard-shortcutsdatatip

VS2010 Debugging: Display Datatip w/o mouseover (use keyboard)?


I'm in VS2010, on a breakpoint. How can I cause a datatip to be displayed for a given variable/expression w/o using my mouse to hover it?


Solution

  • That can't be done, exactly, but you can get the same result by selecting the variable you want to watch (using ReSharper's Ctrl + Alt + / can speed this up), and pressing Shift + F9, which will raise "QuickWatch" modal window with the datatip contained within.

    If you prefer, you can also go into Options->Keyboard and bind the Debug.AddWatch to a different keyboard shortcut, and use that instead of Shift + F9, and then your variable data will persist in the Watch window so you can come back to it later (as suggested here)

    You can also do this by opening the command window (Ctrl + Alt + A) and typing Debug.AddWatch variable_name.