My C# application is consuming too much working set memory and I want to see the objects that are there in the work set memory.I dumped the process and created a dump file as the answer of this question. How do I use a dump file to diagnose a memory leak? But I am unable to debug the file from Windbg as it says 'unable to load clr' when I type the command, '.loadby sos clr'. Also the commands '!dumpheap -stat' and '!threads' also say that 'No export threads found'. Please advice me a way to debug this dumped file and find the objects.Please provide a solution apart from using VS2013 Ultimate.
I recommend you to use Psscor2 or Psscor4 extensions (depending .NET version used by you application). After setting up the debugging environment (installing WinDbg and copying to its folder Psscor files) load dump file and load appropriate version of Psscor:
.load psscor4
Then execute command to download symbols from Microsoft servers (if needed), make sure that you have an internet connection:
!symfix
And from now you should have access to plenty very interesting commands (look for !help to list them). To see memory usage per type use:
!dumpheap -stat
To see overall memory usage (iu means that also unrooted objects will be included):
!heapstat -iu
You can also use VMMap tool to see overall memory usage of the process (not memory dump) to see how much of it is consumed by the managed heap.
What is your target Framework?
.loadby sos clr 
are .net 4 commands, to debug prior Version 4 try to use
.loadby sos mscorwks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With