The Visual Studio is the primal IDE for developping .NET applications. Especially its debugging features makes it more powerful. One of those feature is the “Visualizer”s. Visualizers are UI components to show the content of some complex objects when debugging. The best example is the built-in “DataSet Visualizer”.
Let’s assume you put a breakpoint on some line and it hit there; you wanted to see the contents of a DataSet that you used earlier this line which debugger hit. You just hover your mouse on your DataSet variable and you will see a tiny little magnifying glass icon as below :
When you click on it, it will show you the content of the dataset in a window as below :
So far, I wanted to explain what is a visualizer for the developers who are not familiar with it yet.
One of our customers has contacted us and said that she’s hovering on her dataset variable but the magnifying glass is not there.
I explained that the the DataSet visualizer is acutall a .NET assembly named “Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll” and it resides under
“InstallPath\Microsoft Visual Studio 8\Common7\Packages\Debugger\Visualizers” folder for Visual Studio 2005 and “InstallPath\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers” folder for Visual Studio 2008.
First checked if this file is there, it was there. Also checked the content of the “Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll” file with a “Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll” that I got from another machine without any issues with DataSet visualizer. It was same in size and each byte was same.
This DataSet visualizer needs the main assembly named “Microsoft.VisualStudio.DebuggerVisualizers” in GAC (Global Assembly Cache) as in the screenshot below:
We ticked another check to this also.
A bit more info before diving into a bit more deep …
When our first logon to a machine with Visual Studio installed, a folder under your “My Documents” folder named “Visual Studio 2005” or “Visual Studio 2008” is created for your user. This folder is used only for this user. This personal “Visual Studio 200x” folder also contains a “Visualizers” folder.
As you can guess, the main “InstallPath\Microsoft Visual Studio X.0\Common7\Packages\Debugger\Visualizers” folder is avaliable for all users. As we have the “Microsoft.VisualStudio.Debugger.DataSetVisualizer.dll” under this folder and it’s correct. There should be something wrong in our personal “My Documents\Visual Studio 200X\Visualizers” folder.
I asked our customer to backup all the contents of this “My Documents\Visual Studio 2005\Visualizers” folder somewhere and remove the ones under “My Documents\Visual Studio 2005\Visualizers”.
Our customer ran her Visual Studio 2005 and tiny DataSet visualizer magnifying glass started showing up and all worked fine.
By the way, I want to add a few more notes about visualizers. I’m pretty sure you asked while you noticed the existince of the common folder “InstallPath\Microsoft Visual Studio X.0\Common7\Packages\Debugger\Visualizers” folder and your personal “My Documents\Visual Studio 200X\Visualizers” folder.
There should be a reason for separating this. The answer is “yes” J Also this separation leads another thing, you can write your own Visualizer too.
MSDN is there and waiting for you to develop your own Visualizer :