Using OzCode to flatten class hierarchies while debugging

While debugging deep class hierarchies in Visual Studio, I was often annoyed by having to constantly expand the “base” nodes to get to see the members I wanted to see. This happens because Visual Studio  only shows fields and properties declared on the given type, and tucks all the members of the base classes under the “base” node. This is helpful in some cases, but more often than not, I found that it gets in my way.

And so, after trying Jared’s solution, I decided to have a go at it and try to fix this problem in OzCode.

The idea is that if you’re interested in a property of the base class, you can star that property, which causes the property to appear at the top of members list, and also in the text of its parent.

So for example, in the following scenario, I had to expand two base nodes to get to see the properties I wanted, “Important” and “Interesting”:

But once I star these properties, they will always appear at the top, even when viewing variables of the Derived type, so I’ll see:

These stars are persisted and will be shown whenever you view an object of that type in the DataTip or QuickWatch window from that moment on, so the next time you view a variable of that type, you won’t need to expand those “base” nodes.

Also, because starred values appear as the parent node’s text, if you’re looking at, say, a list of these deeply nested objects, you will be able to see the starred properties and fields without even expanding the nodes at all.