Debugging with OzCode: What List Element is this?

If you ever debugged code that had a list, you wished you could see more than the namespace and class name for the elements in that list. Today we look at one of my favourite features of OzCode to solve exactly that problem.

This feature is called Reveal and is easily overlooked. Your lists normally look like this one:

OzCode offers an incredible simple way to see values of an element instead of the name: just click on the star next to the property name to see instantly its name and value:

You aren’t limited to only one value. The order in which you click them decides the order in which the values are displayed. You can change the selection whenever you like and it stays around even when you restart Visual Studio.

If you don’t have OzCode you can use the DebuggerDisplayAttribute to show the values you are interested in or implement the ToString() method. Both approaches work, but they offer no flexibility inside your debugging session.

 

Conclusion

This simple feature is a great help to debug lists. You can select the data you are interested in with one click and change it when your focus switches to another aspect.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.