Post on 18-Dec-2014
description
Debugging DotNet app Debugging DotNet app with Windbg + SOSwith Windbg + SOS
WinsonWinson
Why?Why?
Crash dump analysisCrash dump analysis
CLR internalCLR internal
Pre-requirement: download & installing Pre-requirement: download & installing WinDbg from MSDNWinDbg from MSDN
Microsoft Office PowerPoint 2007 Present
http://msdn.microsoft.com/en-us/magazine/cc163791.aspx
Microsoft Word Document
C:\Program Files\Debugging Tools for Windows (x86)C:\Program Files\Debugging Tools for Windows (x86)
C:\Windows\Microsoft.NET\Framework\v2.0.50727C:\Windows\Microsoft.NET\Framework\v2.0.50727 mscordacwks.dll mscorwks.dll SOS.dllmscordacwks.dll mscorwks.dll SOS.dll
Sample appSample app
srv*c:\symbols*http://msdl.microsoft.com/download/symbols
Start running target appStart running target app
The code has console.readkey(), so could keep in The code has console.readkey(), so could keep in memorymemory
Using “start without debugging”Using “start without debugging”
Using “Attach to running process”Using “Attach to running process”
Don’t know why I can’t use “open executable…”. In my Don’t know why I can’t use “open executable…”. In my testing only “attach..” could load sos.testing only “attach..” could load sos.
Using command “.load sos”
!sos.help!help funcname
!dumpheap
!dumpheap –type Program
!dumpobj 01359be0
VideoVideo
http://channel9.msdn.com/blogs/egibson/msdn-simulcashttp://channel9.msdn.com/blogs/egibson/msdn-simulcast-techniques-in-advanced-net-debugging-with-john-robbit-techniques-in-advanced-net-debugging-with-john-robbins-part-1-of-3ns-part-1-of-3
LinksLinks
http://blogs.msdn.com/b/tess/http://blogs.msdn.com/b/tess/
http://www.codeproject.com/KB/cs/net_type_internals.ashttp://www.codeproject.com/KB/cs/net_type_internals.aspxpx
http://blogs.msdn.com/b/dougste/archive/2008/08/08/a-bihttp://blogs.msdn.com/b/dougste/archive/2008/08/08/a-big-list-of-debugging-resources.aspxg-list-of-debugging-resources.aspx
http://www.microsoft.com/download/en/details.aspx?id=2http://www.microsoft.com/download/en/details.aspx?id=21255 1255 Psscor Managed-Code Debugging Extension foPsscor Managed-Code Debugging Extension for WinDbgr WinDbg
http://blogs.msdn.com/b/tess/archive/2010/03/01/nehttp://blogs.msdn.com/b/tess/archive/2010/03/01/new-commands-in-sos-for-net-4-0-part-1.aspxw-commands-in-sos-for-net-4-0-part-1.aspx
http://blogs.msdn.com/b/tom/http://blogs.msdn.com/b/tom/