Tutorial :Visual Studio Debug Visualizer for all types



Question:

When developing a Visual Studio (2005) Debug Visualizer, you have to specify the target type you want to visualize (i.e. a DataSet Visualizer would specify its target at TypeOf(DataSet)). However, what if you want your Visualizer to be able to visualize any object type? Specifying the target to TypeOf(Object) doesn't seem to work.

Edit: this is for purely managed code.


Solution:1

You can't, which is a shame. The target type must be typeof(T) for some T other than "object".


Solution:2

You can't just visualize every object. There are certain requirements regarding serialization (for example). I never created a complex visualizer myself (just one for a custom mailobject), but that was the premise in all articles went to that direction.

Edit:

Mole 2010 is a great Visualizer that display generically many things.


Solution:3

Please see this article, in particular you want AutoExpand rules.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »