Inspector
I’ve cooked up a little StateBrowser work-alike that I’ve imaginatively dubbed ‘Inspector’. StateBrowser was crashing with my object graphs, and wasn’t open source, so that was the primary motivation for creating it.
All it does it show you the values of an object. That’s it. Like the Autos window in Visual Studio. The difference is Inspector lets you do it at run-time, where ever you want in your code. It also handles the more complex data types in a better way, IMHO. What it can do: * Shows property and field values * User-settable binding flags (i.e., ‘display only fields marked private’) * Quick view for several managed types such as Icon, Image, Font, various forms of collections (IList, ICollection, IDictionary), byte arrays, Color, Boolean, and of course anything convertible to a string. * Byte arrays can be optionally converted to a string using a specified encoder (ASCII, Unicode etc.) * Various collections’ values can be inspected individually, and may in turn be inspected, drilling-down a object tree * Quick view for string data can be displayed in either monospaced/serif/sans-serif fonts.
Some screenshots:
Collapsed view of a string array:

The same object without collapsing, hiding inherited fields:

A Hashtable. The quick view lists out the key-value pairs, and the tree allows for futher digging.

Quick-viewing a Font instance:

You can download the source and a demo right here
Oh, and props where props are due: the TreeListView control is by Thomas Caudal
23. October 2003More stuff in: code
Comments
Commenting is closed for this article.
