String, oh string, what a character you are... "Visual Studio String Debug Visualizer"

Sign in to queue


So I've been on a little bit of a Visual Studio Extensibility kick recently, Saving your sanity with Snippets, Saving you some labor in creating your Unit tests..., Misspelled strings in your projects? Visual Studio Spell Checker (with source too). Meaning it might be time to post on something else...

But not today. Smiley

When I saw today's project by David Michener I got a chill. This is something that could have saved me hours and hours of effort in the past. It's simple, but in hindsight, something so obviously useful and needed...

Visual Studio String Debug Visualizer

This Visual Studio 2012 Debug Visualizer will show the hex values of a given string and the text value in a split window, revealing what is otherwise hidden data. This is useful when working, for example, with data that is read from a file that may have come from a *nix system and contains different line endings (CR vs CR/LF).


To use this visualizer with other versions of Visual Studio, just change the Microsoft.VisualStudio.DebuggerVisualizers references to the version that aligns with your Visual Studio version.
To install:

  1. Either compile the source -or- download the executable.
  2. Copy the executable from the compiled source (<home>\StringVisualizer\bin\Debug\StringVisualizer.dll) or the download to <MyDocuments>\Visual Studio 2012\Visualizers
  3. Restart Visual Studio.

When debugging a project you can hover on a String variable and select 'Advanced String Visualizer' from the spyglass icon in the tool-tip, or from the spyglass icon in the Locals or Autos windows.

Generic Episode Image

And what's even better than this is that David released the source too...


As you can see, it's not complex or complicated, but that's the beauty of it.


Simple, easy and just works, fulfilling a common need. Smiley


The Discussion

Add Your 2 Cents