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

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).

image

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.

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

image

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

imageimage

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

image

Tags:

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.