Share via


Where’s my good old friend DataSet visualizer ?

 

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 :

How to: Use a Visualizer

How to: Write a Visualizer

Walkthrough: Writing a Visualizer in C#

How to: Install a Visualizer

How to: Test and Debug a Visualizer

Visualizer API Reference

Comments

  • Anonymous
    April 04, 2011
    Thank you thank you thank you a million times. You are awesome

  • Anonymous
    April 09, 2011
    @David Nicolau, I'm very pleased to hear that my post helped you.Thank you :)

  • Anonymous
    May 17, 2011
    I am using Visual Studio 2010. i have trouble to visualize dataset while debugging. i tried to delete Visualizers in MyDocuments folder but it didn't work. Please suggest some solution.

  • Anonymous
    January 04, 2012
    I am having the same problem.followed the steps suggested. But the issue is not resolved

  • Anonymous
    August 09, 2012
    Very helpful - Thanks a lot!

  • Anonymous
    May 18, 2014
    Its working fine thank you for such a marvelous explanation :)

  • Anonymous
    April 22, 2015
    It worked for me too! Thanks for the solution and its explanation :)

  • Anonymous
    May 26, 2015
    Very helpful, thank you!

  • Anonymous
    August 03, 2016
    gac assembly worked. thx

  • Anonymous
    August 11, 2017
    It solved a similar issue with the DataTable Visualizer in Visual Studio 2017. Still applies many years & versions later.