none
Heap viewer for .NET 2.0/3.0/3.5? RRS feed

  • Question

  • Does anyone know of a good (managed) heap viewer for .NET? 

     

    Ideally, something that plugs into VS and can visualize the heap of a process being debugged (when stopped at a breakpoint, of course).  I'd like to see all classes with instances, an instance count for each class, with drill-through to a detailed listing of each and every instance of a class when I need it.

     

     

    Wednesday, March 26, 2008 1:26 AM
    Moderator

Answers

All replies

  • Microsoft has an application called clr profiler that will allow you to view the heap.  You wont be able to breakpoints in your classes though.

    clr profiler download
    http://download.microsoft.com/download/4/4/2/442d67c7-a1c1-4884-9715-803a7b485b82/clr%20profiler.exe
    How to use clr profiler.
    http://msdn2.microsoft.com/en-us/library/ms979205.aspx


    Wednesday, March 26, 2008 6:07 AM
  • CLR profiler looks like a great tool - I knew it existed, but hadn't tracked it down, thanks!

     

    If it didn't require running the application to completion it'd be almost perfect - the particular issue I was trying to track down caused an application to run so slowly that it would, for all practical purposes, never finish, which is why I'd really like to see a tool that integrates with the VS debugger.  Fortunately, I found the particular problem I was looking for via old fashioned "comment out code until the problem goes away" debugging.

     

    Wednesday, March 26, 2008 8:06 PM
    Moderator
  • I used a couple of commerial products before.  Aqtime is pretty good and intergrates in the ide, there is also a profiler that is made by the people who make resharper.  I used both of these before and they are pretty good,  I like the jetbrains one better though.  There are probably tons of other commerical and free/opensource ones too.  Try googling up and see what you find.

    http://automatedqa.com/products/aqtime/index.asp
    http://www.jetbrains.com/profiler/
    Thursday, March 27, 2008 1:27 AM
  • --I'd really like to see a tool that integrates with the VS debugger.

    You can use SOS Debugging Extension (SOS.dll) with visual studio debugger when debugging managed applications.
    For more details, please visit the following references:
    Traversing the gc heap (and introducing PSSCOR.DLL)
    Getting down to the metal: using the CLR Runtime's SOS extention in Visual Studio
    SOS your Visual Studio

    Thursday, March 27, 2008 7:03 AM
  •  Feng Chen - MSFT wrote:
    --I'd really like to see a tool that integrates with the VS debugger.

    You can use SOS Debugging Extension (SOS.dll) with visual studio debugger when debugging managed applications.

     

    Great!  I didn't know that VS2005 could load SOS (which I've heard of, but never used).  Too bad it doesn't work for x64 code (mixed debugging isn't supported).  Maybe in VS2008?

    Thursday, March 27, 2008 10:41 PM
    Moderator
  • Either VS05 or VS08 is still 32bit process.

    So I think you will have to use 64bit version of WinDbg and load 64bit of SOS.dll.
    Friday, March 28, 2008 1:53 AM