471,605 Members | 1,459 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 29 '06 #1
1 2019
Hi Udi,

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

Yes,
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?

Did you copy your assembly to a suitable folder for visualizers?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Jan 30 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Ziaran _ | last post: by
1 post views Thread by Rhino | last post: by
reply views Thread by stevenkblack | last post: by
reply views Thread by Udi | last post: by
2 posts views Thread by Joanna Carter [TeamB] | last post: by
reply views Thread by Anders K. Olsen | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | 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.