471,310 Members | 990 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

VS2005 Debugger Visualizer

Udi
Hi,
I have a simple example of a color visualizer and it works fine.

I've tried to add another (new) color visualizer
(an exact copy of the example) in a different (new) solution,
but for some reason I can't see my
new visualizer while debugging. (see code below)

Isn't it possible to add more than one visualizer
to the same type (Color)?

Why do I see only the visualizer from the example
(even when debugging the new solution), and can't
see my own visualizer which is part of that solution?
Thanks,
Udi.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
MyColorVizualizer.cs
~~~~~~~~~~~~~~~~

public class MyColorVizualizer : DialogDebuggerVisualizer
{
protected override void Show(IDialogVisualizerService
windowService, IVisualizerObjectProvider objectProvider)
{
Debug.Assert(windowService != null);
Debug.Assert(objectProvider != null);

Color data = (Color)objectProvider.GetObject();

Debug.Assert(data != null);

using (MyColorVizualizerDlg displayForm =
new MyColorVizualizerDlg(data))
{
displayForm.Text += " " + data.ToString();
windowService.ShowDialog(displayForm);
}
}
}

//////////////////////////////////////////////////////////
MyColorVizualizerDlg.cs
~~~~~~~~~~~~~~~~~~

public partial class MyColorVizualizerDlg : Form
{
public MyColorVizualizerDlg(Color color)
{
InitializeComponent();
BackColor = color;
}
}

////////////////////////////////////////////////////////////////////
AssemblyInfo.cs
~~~~~~~~~~~~

[assembly: DebuggerVisualizer(typeof(MyColorVizualizer), Description =
"Udi's Color Visualizer", Target = typeof(Color))]

///////////////////////////////////////////////////////////////////

Jan 28 '06 #1
0 912

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Udi | last post: by
1 post views Thread by dethonlegs | last post: by
2 posts views Thread by Joanna Carter [TeamB] | last post: by
reply views Thread by Anders K. Olsen | last post: by
5 posts views Thread by Gumby | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.