In my last post, I revealed that I am a magician; an OzCode magician1. I also revealed the new LINQ support currently in EAP. Since that was two reveals in one, I thought that I would look at another OzCodeĀ feature today coincidentally called Reveal.
I remember this specific feature as "favourites for properties" although I am reliably informed by the OzCode team, their website, and their documentation that it is in fact called "Reveal"2. Reveal was the feature that first lured me into regular use of OzCode and if it is the only feature you use, you will still wonder how you really survived without it.
When debugging, we can spend lots of time drilling down into objects to find the value of various properties and sub-properties. This can get especially tiresome when we're looking at a few similar objects since we repeat the same steps. Although pinning certain values is helpful, it does not really solve the initial issue of drilling down to find the thing to pin.
With Reveal, we can make life much simpler by elevating the details of an object to itsĀ summary; like an on-the-fly custom ToString
Ā implementation. Not only does this help with looking at one item, but it really helps with collections of similar items. For example3:
Any properties that are "revealed" carry across to the rest of the debug sessionĀ and beyond;Ā once you have revealed some properties, they stay revealed until you decide you do not want them to be anymore, even across debug sessions.
You can even see (and change) your revealed properties directly within the LINQ analysis window.
Finally, revealed properties propagate up the object hierarchy allowing you to surface values from deeper in your object tree. This can really be a huge time saver, especially since the revealed properties are remembered across sessions.Ā No more hovering over multiple things to find what you're looking for and no more writingĀ custom ToString
Ā overrides, debug visualizers,Ā or other workarounds.
Hopefully, thisĀ overview of Reveal in OzCode has demonstrated not only why I love it so much, but also how valuable it can be. I genuinely believe OzCodeĀ to be an essential tool in any .NET developer's kit, but since you may mistake me for some corporate shill, you should not take my word for it; tryĀ OzCode out for yourself with a free trial (or take part in the EAP). Stop performing workarounds and start performing magic.
- Read as Sean Connery as James Bond [↩]
- and apparently it doesn't matter how often I tell them they are wrong [↩]
- To demonstrate, I am using the handy demo app from OzCode, which you can find onĀ GitHub [↩]