Is there a way to call up visual studio's object visualization tools in my own code? say I want to be able to click something and inspect it like the debugger would if I hovered over it in code or added it to the watch?
A:
I thought this might work:
var ddv = new Microsoft.VisualStudio.DebuggerVisualizers
.VisualizerDevelopmentHost(this,typeof(FormMain));
ddv.ShowVisualizer();
But it throws:
System.InvalidCastException: Unable to cast object of type 'Herbsta.FormMain'
to type 'Microsoft.VisualStudio.DebuggerVisualizers.DialogDebuggerVisualizer'.
Maslow
2009-08-06 14:01:18