When debugging complex data structures, it would be enormous helpful if one could write a custom visualizer of the data. The visualizers that are provided by visual studio are quite cumbersome to use, difficult to implement and nearly impossible to adapt to a certain problem that one want to investigate (e.g. highlight the (2,4) cell in all 4x4 int matrices).
So here is my idea:
If there is not a static class Ozcode.DebugHtmlProvider in the current debugging context or this class does not provide a static method with the signature "string GetHtml(object obj)", nothing will happen (of course any class/method name can be used).
Otherwise, if the mouse is now moved over an expression (=: expr) and DebugHtmlProvider.GetHtml(expr) returns a non null string, an html viewer is shown that renders the provided html (as for me, the user could be required to press a certain modifier key for this feature).
This has the following advantages:
* Unlike visual studios visualizers, no mouse clicks are required.
* It is very easy to implement a custom renderer.
* There could be a DebugHtmlProvider implementation that can be obtained via nuget and that provides some infrastructure (e.g. that checks whether an object implements a certain interface).
* Nevertheless, such dependencies are still optional
* One could use html tables/SVG/colors to render complex data structures
The possibilities are endless and I am sure this is a feature that is easy to implement if one has already developed a custom data tooltip like the one you ship with OzCode.
Customer support service by UserEcho