Debug live website crash with DebugDiag and Windbg – capture memory dump

Application crash

In this scenario we want to capture a memory dump at the exact moment the application has crashed.

Start the “Debug Diag Collection” tool and select “Crash”


Select a specific application pool, i.e the application pool that your site is running.


Select the application pool of your website


Leave the defaults selected. In DebugDiag 2.0 this will record the call stack for first chance exceptions and a full memory dump for second chance exceptions, i.e. an application crash.


Take note of the logs files path: C:\Program Files\DebugDiag\Logs


Finish the wizard to activate the collection rule.


You will find that DebugDiag generates several files:

  • .txt files that will record the first chance exception call stacks, libraries loaded into the appdomain and thread creation

  • .dmp files that are a dump of the memory contents of the application

It is the .dmp file that will be loaded and analysed in WinDbg.