Click here to Skip to main content
15,867,568 members
Articles / Programming Languages / C#

Zeta Color Visualizer

Rate me:
Please Sign up or sign in to vote.
4.90/5 (27 votes)
26 Dec 2007CPOL2 min read 74.2K   380   29   18
A Visual Studio .NET 2008 Debugger Visualizer for the Color structure
Image 1 Image 2 Image 3

Introduction

This short article presents you a tiny Debugger Visualizer for Visual Studio .NET 2008 to visualize Color structure data types.

A Debugger Visualizer is being used while you debug your code. Whenever you inspect a variable, Debugger Visualizers help you to display the current value of a variable in a more useful way.

There are several built-in Debugger Visualizers, e.g. for strings, for XML strings, for HTML strings or DataSets. In addition you can extend the Debugger Visualizers by providing your own. Several CodeProject members already did.

Background

Inspired by this article that shows a Debugger Visualizer for displaying Image class data types, I created this one here. No rocket science but probably quite handy, at least to me.

Installing the Debugger Visualizer

To install the Debugger Visualizer on your system, simply drop the DLL directly in the Visualizers Visual Studio .NET 2008 folder of your user account.

In my installation on Windows Vista, this complete folder path is named C:\Users\ukeim\Documents\Visual Studio 2008\Visualizers. Yours may differ.

Using the Debugger Visualizer

After this "installation", simply debug as normal, setting your breakpoints. Whenever you are about to inspect a variable of type Color, you see the magnification glass. Click it and you see the Debugger Visualizer displaying the value.

Image 4

Please note that I explicitly compiled the DLL against Visual Studio .NET 2008 (i.e. it probably will be unusable for Visual Studio .NET 2005 without rebuilding).

Building the DLL on your Own

In the download ZIP archive for this article, I included both the DLL and the source code (of course). The source contains the actual Debugger Visualizer, as well as some very tiny console applications to test it.

(Interestingly enough, you do not need to restart Visual Studio .NET in order to have changes available in the debugger. It appears immediately - nice one!)

I set up my build environment so that the output of the build (i.e. the Debugger Visualizer DLL) is being placed directly in the Visualizers folder, thus giving me maximum comfort when developing the DLL itself.

If you have this folder structure, too:

Image 5

...then you can use the solution directly, since the build output points to the Visualizers folder with a relative folder path:

Image 6

Enjoy using and enhancing. I'm looking forward for your feedback!

History

  • 2007-12-26: Created first version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer Zeta Software GmbH
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

➡️ Give me a tip 🙂

In his free time, he does climbing, running and mountain biking. In 2012 he became a father of a cute boy and in 2014 of an awesome girl.

Some cool, free software from us:

Windows 10 Ereignisanzeige  
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans.  
Homepage erstellen - Intuitive, very easy to use.  
Offline-Homepage-Baukasten

Comments and Discussions

 
QuestionVS 2015 Pin
Mark Oliver14-Aug-16 2:26
Mark Oliver14-Aug-16 2:26 
QuestionMedia Color Pin
strtdusty29-Aug-08 5:51
strtdusty29-Aug-08 5:51 
Thanks, this works great. It would be really cool if it would support
System.Windows.Media.Color
as well as the current System.Drawing.Color.
AnswerRe: Media Color Pin
Uwe Keim29-Aug-08 6:09
sitebuilderUwe Keim29-Aug-08 6:09 
GeneralRe: Media Color Pin
strtdusty29-Aug-08 6:24
strtdusty29-Aug-08 6:24 
GeneralAs always, ausgezeichnet! Pin
Christian Merritt8-Jan-08 14:13
Christian Merritt8-Jan-08 14:13 
GeneralRe: As always, ausgezeichnet! Pin
Uwe Keim27-Jan-08 7:56
sitebuilderUwe Keim27-Jan-08 7:56 
GeneralRe: As always, ausgezeichnet! Pin
Christian Merritt27-Jan-08 8:20
Christian Merritt27-Jan-08 8:20 
JokeRe: As always, ausgezeichnet! Pin
Uwe Keim27-Jan-08 8:21
sitebuilderUwe Keim27-Jan-08 8:21 
GeneralThanks!!! Pin
Paw Jershauge8-Jan-08 11:34
Paw Jershauge8-Jan-08 11:34 
GeneralRe: Thanks!!! Pin
Uwe Keim27-Jan-08 7:56
sitebuilderUwe Keim27-Jan-08 7:56 
GeneralNicely Done Pin
Tomer Noy31-Dec-07 3:22
Tomer Noy31-Dec-07 3:22 
GeneralRe: Nicely Done Pin
Uwe Keim1-Jan-08 10:39
sitebuilderUwe Keim1-Jan-08 10:39 
GeneralSmart idea Pin
axuno28-Dec-07 10:34
axuno28-Dec-07 10:34 
GeneralRe: Smart idea Pin
Uwe Keim28-Dec-07 23:08
sitebuilderUwe Keim28-Dec-07 23:08 
GeneralSweet! Pin
Ravi Bhavnani26-Dec-07 15:55
professionalRavi Bhavnani26-Dec-07 15:55 
GeneralRe: Sweet! Pin
Uwe Keim26-Dec-07 19:39
sitebuilderUwe Keim26-Dec-07 19:39 
GeneralVery nice Pin
Daniel Vaughan26-Dec-07 15:10
Daniel Vaughan26-Dec-07 15:10 
GeneralRe: Very nice Pin
Uwe Keim26-Dec-07 19:38
sitebuilderUwe Keim26-Dec-07 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.