1 / 9

.NET Debugging for the Production Environment

.NET Debugging for the Production Environment. Part 3: WinDbg & SOS. Brad Linscott. Premier Field Engineer ing. Agenda. Windbg intro Debugging .NET applications with Windbg A common problem when trying to load SOS. WinDbg Intro. Part of Debugging Tools for Windows package

Download Presentation

.NET Debugging for the Production Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. .NET Debugging for the Production Environment Part 3: WinDbg & SOS Brad Linscott Premier Field Engineer ing

  2. Agenda • Windbg intro • Debugging .NET applications with Windbg • A common problem when trying to load SOS

  3. WinDbg Intro • Part of Debugging Tools for Windows package • Free download on Microsoft’s web site • Xcopy-deployable • Automatable (ADPlus), live, post-mortem (production!) • Why use WinDbg/cdb instead of Visual Studio?

  4. WinDbg, cont’d • Unaware of .NET • SOS/psscor2/psscor4 • Symbols – needed with managed debugging? • Saving your workspace in Windbg

  5. .Debugging .NET apps with WinDbg • Command window is “main” window • Load sos/psscor2/psscor4 • .load <extension name>

  6. Common problem loading SOS/psscor2/psscor4 • “Failed to load data access dll”

  7. Common problem loading SOS/psscor2/psscor4 • What is the ‘dac’? • Common root causes of “failed to load” with sos • Download from symbol server • Not using the right dac – copy from the target machine • Debugger/debuggee architecture mismatch

  8. Problem loading SOS/psscor2/psscor4, cont’d • Recommended troubleshooting steps: • Use .cordll, as suggested • Ensure the right dac is used • Debugger/debuggee mismatch

  9. Summary • Two simple rules when dumping/debugging managed applications: • Dump 32-bit applications with a 32-bit debugger, and open the dump with a 32-bit debugger. • Dump 64-bit applications with a 64-bit debugger, and open the dump with a 64-bit debugger. • Keeping architectures aligned will eliminate this problem 90% of the time

More Related