New debugger extension for .NET, Psscor2, released

*UPDATE* The download is now 32-bit ! 

I wanted to be the first to inform everyone that there is a major update to the debugger extension story for .NET.  Psscor2 has been released!  This is a superset of the SOS.dll that ships with the framework.

This extension has a lot of advantages over SOS if you are trying to troubleshoot problems, especially if they are caused by ASP.NET.  All of the functionality that has been talked about on this blog for the SOS that comes with the debugger is now available for .NET Framework 2.0, 3.0, and 3.5.

This one extension will troubleshoot all of those versions.

I will be getting into the new commands and talking more about this in the coming weeks.  But I wanted to let everyone know and have you all go download the extension.

The download contains a version for x86, amd64, and ia64.  Just like SOS, please be sure the debugger and psscor2 match the architecture of the process you want to troubleshoot.

This extension is being released AS IS.  So there is no support for it.  But having said that, if you have an issue or problem, please post it here on my blog and I will try to look into it.

Go download Psscor2 and give it a try.  Happy debugging!

Comments (43)

  1. randyo says:

    Thanks for the new dll, but you might want to make it a 32bit exe to make it easier to unzip.

  2. abdulrauf says:

    Waiting for your further blogs about this.

  3. cms says:

    Can you please pastle a couple of screenshots, I prefere to look at this debugger before downloading.

  4. Great! I like the source-line infos! is this only available in the !CLRStack command? or also in others?

  5. abdulrauf,

    This extension is the same as what has been talked about a lot on this blog.  I will go over the new commands, but most of them are the ones that you can use with the sos.dll that ships with the debugger package.

  6. cms,

    There are lots of screenshots on this blog for using the sos.dll that ships with the debugger package.  This would look the same.

  7. Jochen,

    It is just for !clrstack.  What other commands did you have in mind that you would want that for?

  8. Nariman says:

    This is fantastic news. It’s been a particularly sore point for us in the past [1] but I’m now eager to take on new issues with this in hand – thank you!

    [1] –

  9. Randy says:

    This download is not seen as a valid win32 executable on my Windows machine…am I missing something?

  10. Randy,

    You are not, we are working to fix that now.  The exe is a 64-bit executable.  It should be fixed very soon.

  11. Daniel says:

    Thanks, guys! SOS.dll saved me more than once.

  12. TSW says:

    Any update on this? We are dying to use this (currently battling a crashing issue 🙂

  13. Any idea when we might see a version that works on CLR/.NET 4.0?

  14. Tim says:

    The command, !dumpheap -type, in psscor2 does not seem to work.  When I run it, no objects are listed.  I know that they are in my dump file, because when I run the !dumpheap -stat command, they are listed in the output.

    I’ve tried this with a couple of different dump files and I get the same result, no objects listed.

    If I instead use sos on the same dump files, the !dumpheap -type command works and displays the types in my dump file.

    Has anyone else noticed this?

  15. TSW, No update yet but you can download the exe and extract it on a 64-bit machine and then move the files over.  We hope to have a new exe very soon.

    Mario, we are looking into that as we speak, but no timeline as of yet.  Hopefully soon though.

    Tim, I am not sure exactly what command you are using but there is a slight difference with psscor2 for type.  If you want it to match a partial type, use a wildcard (*).  For example,

       !dumpheap -type System.St*

    If that doesn’t help, can you let me know what you are trying to see and having it fail for you?

  16. VinceG says:

    Works fine in VS2008 although havent tried in WinDbg.

    !dumpheap -type System.String

    produced enough output to keep my system busy for 10 minutes!

  17. Thanks for releasing this.

    I have a few comments if you don’t mind:

    Good stuff:

    – Lots of new commands! Yay!

    – Additional output, e.g. !dumpheap displays generation as well

    – Thousand separators in output. Big Thanks!


    – I noticed that psscor2 has the same new commands as SOS for CLR4, e.g. ListNearObj, GCWhere, etc. but it doesn’t seem to support DML as the new SOS. That would be very helpful.

    – !dumpheap -type seems to require a wild card whereas the SOS counterpart automatically does a "contains" on the supplied string.

    – !clrstack and !dumpstack aren’t too happy with wow64 dumps as far as I can tell (even when using wow64exts).


  18. Brian,

    Thanks for the comments.  Glad you like the new commands.  You are correct, it doesn’t support DML.  That is something that is being looked at but probably won’t be included unless people really want it.

    For dumpheap -type, that was changed so that if you only want System.MyObject it wouldn’t also return System.MyObject.ChildObjects and System.MyObjectAccessor for example.  So that you can get just what you are interested in and not extra stuff.

    wow64 dumps are kind of tricky to see.  Are you able to use those commands with SOS?

  19. Mahi says:

    Looks like the psscor2 download link is broken.

  20. Thanks for the reply.

    I find DML a really useful addition to the new version of SOS as it reduces copy/paste and typing a lot.

    As for wow64: I guess that is just a bumpy road, but I have a couple of examples where SOS seems to perform a little better than PSSCOR2 in this case. Let me know if you want the details.

  21. Mahi,

    I just clicked on it and it worked fine for me.  Can you let me know if you have more problems?  We were updating the link yesterday so it may have had issues from time to time then.

  22. Brian,

    Thanks, I would like the details.  Can you use the link to send me a message with the details?

  23. piers7 says:

    No DML!?! But… but…

    Talk about give with one hand and take with the other.

  24. Piers7,

    DML is something we are looking at for the future.  Hopefully it will be available in a future update soon.  If more people really want DML, please let me know so I can better prioritize it along with other updates.

  25. JohnW says:


    When I use !address -summary, I get the following.  Platform is win2008 SP2, 64-bit. Can repro on other dumps as well.

    0:000> !address -summary

    Failed to map Heaps (error 80004005)

    — Usage Summary —————- RgnCount ———– Total Size ——– %ofBusy %ofTotal

    Free                                    912      7ff`2b892000 (   7.997 Tb)           99.96%

    <unclassified>                         1983        0`b284d000 (   2.789 Gb)  84.02%    0.03%

    Stack                                  1968        0`14800000 ( 328.000 Mb)   9.65%    0.00%

    Image                                  2605        0`0d1a7000 ( 209.652 Mb)   6.17%    0.00%

    TEB                                     656        0`00520000 (   5.125 Mb)   0.15%    0.00%

    NlsTables                                 1        0`00023000 ( 140.000 kb)   0.00%    0.00%

    ActivationContextData                    22        0`00020000 ( 128.000 kb)   0.00%    0.00%

    CsrSharedMemory                           1        0`00006000 (  24.000 kb)   0.00%    0.00%

    PEB                                       1        0`00001000 (   4.000 kb)   0.00%    0.00%

  26. Ted says:


    I am also seeing "Failed to map heaps". We have a bad memory leak but when I add up all the heap data – it is far, far less than what say TaskMan shows. So far sos tools have been great but I’d like to know about this heap error message.



  27. Ted,

    Can you tell me the version of the debugger, 32 or 64 bit debugger?  And what is the OS you are running this on?  Also, are you using the public symbol server?

  28. JohnW says:


    I am using 64 bit windbg 6.12.0002.633 AMD64, as well as the public symbol server.

  29. plodoc says:


    I am also seing "Failed to map heaps" when using the debugger 6.12.0002.633, 32 or 64-bits. When running on Windows 2008 R2 x64, and when running on Windows 2003 SP2 x86, with the public symbol server.

  30. satish says:

    why doesnt !clrstack show line numbers? my symbols match and are loaded.

  31. Satish, Does it show line numbers for any functions?  Does it show the source file?

  32. I'll look into the failed to map heaps soon and let you know what I find out.

  33. Daniel says:

    @Tim (2 Apr 2010)

    I had similar issues when I had both sos and psscor2 loaded.

    .unloadall and reloading just psscor2 fixed my issue.

  34. Apparently !do lists the value of IntPtrs as decimal instead of hex as I would expect. E.g.

    0:038> !do 3e5ea8cc

    Name: System.EventHandler

    MethodTable: 703b914c

    EEClass: 70171760

    Size: 32(0x20) bytes

    GC Generation: 2



         MT    Field   Offset                 Type VT     Attr    Value Name

    703d84dc  40000ff        4        System.Object  0 instance 3e5ea33c _target

    703dd0ac  4000100        8 …ection.MethodBase  0 instance 00000000 _methodBase

    703db188  4000101        c        System.IntPtr  1 instance 523057820 _methodPtr       <— **** Should be 1f2d3a9c ****

    703db188  4000102       10        System.IntPtr  1 instance        0 _methodPtrAux

    703d84dc  400010c       14        System.Object  0 instance 00000000 _invocationList

    703db188  400010d       18        System.IntPtr  1 instance        0 _invocationCount

    Of course there's an easy workaround, since I can just dump the memory from the offset, but it would be better to list the value of IntPtrs as hex just as the SOS version of !do does.

  35. Novak Savic says:

    I just got some negative numbers in analysis.

    What cound be the reason for this?

    Case 1:

    0:000> !heapstat -inclUnrooted

    Heap            Gen0          Gen1               Gen2         LOH

    Heap0    1962152      4671712      173081896    2002269960  

    Free space:                                                                                                    Percentage

    Heap0     15600          454736       158980952    -1337812104          SOH: 88% LOH: 46%

    Unrooted objects:                                                                                        Percentage

    Heap0    1361032      4208384      1567272      272721352               SOH:  3% LOH:  4%

    Case 2:

    0:034> !heapstat -inclUnrooted

    Heap         Gen0            Gen1             Gen2                    LOH

    Heap0    776360       1122064      213038328    -1009803888

    Free space:                                                                                                     Percentage

    Heap0     5832           302352       204661864      642485352              SOH: 95% LOH: 19%

    Unrooted objects:                                                                                          Percentage

    Heap0    549800       412400             49328          35374112                 SOH:  0% LOH:  1%

  36. M L says:

    I have been looking for a version/keeping an eye out for the CLR4. Is there still the intention of building a version comatible with CLR4?

  37. Yes there is.  Hopefully it will be live on the internet in the next few weeks.  Working on it now.

  38. James L says:

    I'm behind a corporate firewall and I can't download executables.  Can this be packaged as an msi or even a zip?

  39. Yes it can.  If you download and extract the exe like at home, it contains a zip that you could then send to yourself.  Let me know if that doesn't work for you.

  40. Vandana Gopal says:

    Loved the new commands. Had one question. The output from the command !aspxpages lists the amount of time the various threads have been running. Does this include the amount of time the thread has been idle as well or just the active running time? I'm trying to solve a high CPU usage problem.

  41. Vandana,

    The output is the total time.  It is the timestamp of the request subtracted from the current time of the process.

Skip to main content