Better String Visualization in VS2005

The text visualizer in Visual Studio 2005 isn’t very good. When you’re looking at a string in the debugger, you won’t see what you’re looking for if there are any null characters in the string. As far as I can tell this is a holdover from the bad old days when null-terminated C strings were the norm.

This is a pain in the butt if you are dealing with data stored in a System.String. I regularly work with data that needs to be viewed in hexadecimal format. That’s why I created the hex string visualizer, thanks to THIS POST by 4 Guys From Rolla, which is a mighty fine tutorial on creating visualizer plugins.

Here’s what the not-so-informative text visualizer looks like:

Here’s what my hex string visualizer looks like:

I’ll leave it as an exercise to the reader to figure out which one gives better debugging info.

This is more useful in my day job as a home automation programmer, but it will also come in handy when it comes to debugging low-level communications in the MUD.

It’s available HERE if you want a copy. Just drop it in your My Documents\Visual Studio 2005\Visualizers directory and it’ll be available in the list of string visualizers next time you run Visual Studio 2005.