Jan 15 2010

Visualizing Runtime Object Graphs

One of the first questions people seem to ask when they see the Dependency Graph features of Visual Studio 2010 is whether it can also be used to visualized runtime object graphs.

In this Video (WMV, or MP4) I will show you how that can be done using the SOS debugger extensions and specifically the GCRoot command.  I've used this technique several times to help figure out some really complex memory leak bugs and so I'm confident you will find this to be a useful tool to add to your toolbox of tricks.

The code for the GCRootToDGML tool is available to download so you can try this out yourself, it should work with any recent version of Visual Studio 2010.

 

Comments

1/16/2010 1:08:02 AM
Pavan. United States
Pavan.
Great post! Is ther a way to automate the "dump gcroot output to .log file and then manually run your program". Is there a way to spawn it from the immediate window itself?

Thanks,
Pavan.
1/17/2010 3:15:51 PM
Chris Lovett
Chris Lovett
I don't know the answer to your questions, but you are right, this is exactly the next step. Let me know if you find a solution Smile
1/20/2010 8:19:39 PM
trackback
Amazing .NET Reference Visualizations

Half the battle when tracking down memory problems in a .NET application is seeing the reference chain
1/22/2010 1:41:08 AM
Aaron Marten
Nice!
1/25/2010 11:24:32 AM
Jandeep United States
Jandeep
Awesome post ! link to the Video is broken ..can you fix it?
thanks
1/26/2010 10:59:39 AM
Chris United States
Chris
I added mp4 videos (slightly smaller) with links to screencast.com which should help.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading