0

When a DataTip is open while debugging in Visual Studio it appears the only way to get to a specific object property is scrolling with the mouse.

This can get very cumbersome as some objects can have hundreds of properties and scrolling to a property near the bottom takes a long time.

Yes, I know I can scroll faster if I hover the mouse over the bottom edge and pin a property once I found it but it can still take a long time to get to the property and pin it.

I've tried various combinations with Ctrl and Alt but what ever key I press the DataTip is promptly closed...

Developer Guy
  • 2,318
  • 6
  • 19
  • 37
Dean Kuga
  • 11,878
  • 8
  • 54
  • 108

2 Answers2

1

Once the DataTip has focus, you don't have to use the mouse. You can use the PgUp/PgDn (Page Up/Page Down) keys on your keyboard. But you're right: There is not a way to get to the end of the list or to get to items that start with a certain letter. When I need to do that often I take one of two approaches:

  1. If possible, I create a [temporary] variable assignment after the code-line of interest and ensure that the variable gets assigned to the property of interest.

  2. Create a watch variable and interact with that.

  3. Open an Immediate Window and paste a copy of the object-instance name in question. Once in the Immediate Window, IntelliSense is available as soon as you type the "."--you can then type the letter of the property in question and drill-down as needed more quickly.

(Probaby the best tip!)

  1. Open (and keep open for convenience) a Debug | Windows | Autos and/or Debug | Windows | Locals window. Those windows simplify navigating variables near the code break or in the current module--and they even seem to retain their tree-node-expanded state in some cases while debugging. More information is available here: https://msdn.microsoft.com/en-us/library/bhawk8xd.aspx
Jazimov
  • 12,626
  • 9
  • 52
  • 59
  • I've done 1. but I'd avoid it. It's way too easy to forget removing it once no longer needed... – Dean Kuga Apr 30 '18 at 17:47
  • I agree with (1)--at least (2) and (3) are not code-invasive. I do hope Microsoft improves that DataTip window, for crying out loud. No one should need a third-party tool to address that. I get the lazy-loading approach--I don't get why keys were restricted to PgUp/PdDn, however. I added a (4)--I actually think that's the best tip of all, one I'm going to use myself! – Jazimov Apr 30 '18 at 20:17
0

You could use the oz-code as an extension tool which could help you search the properties or variables easily.

Search in debug mode inside an object

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20