I created a debugger visualizer in VS2008. There are two classes that I made, in the same. DLL: -
- BinaryDataDebuggerVisualizer
- ImageDebuggerVisualizer
The image works fine (for example, a magnifying glass appears in debug mode), but not for byte [] one (BinaryDataDV). What my visualizer does is display binary data as an image in a modal window (if the data is a legitimate image). I compiled the code in Release mode and then dumped the .dll into C: \ Users \\ Documents \ Visual Studio 2008 \ Visualizers
this is the code i used to "define" vis ...
using
System; using System.Diagnostics; using System.Drawing; using System.IO; using System.Windows.Forms; using Microsoft.VisualStudio.DebuggerVisualizers; using Foo.DebuggerVisualizers; [assembly: DebuggerVisualizer( typeof (BinaryDataDebuggerVisualizer), typeof (VisualizerObjectSource), Target = typeof (byte[]), Description = "Binary Data to Image Visualizer")] namespace Foo.DebuggerVisualizers { public class BinaryDataDebuggerVisualizer : DialogDebuggerVisualizer { protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { ... my code in here } } }
I did a unit test in a debugger visualizer solution that runs and validates code that correctly displays legitimate (as well as illegal) image files. so I think the code is ok.
When I am in my real solution, this is what I am doing (where I expect the magnifying glass to show when I hover over a variable in debug mode).
byte[] data = File.ReadAllBytes("Chick.jpg");
then I hover over the data variable when I paused the code during debugging on this line (using a breakpoint).
No hourglass: (
Does anyone have any idea what is wrong?
Pure.Krome
source share