Friday, April 25, 2008

Collecting crash dump on windows

Steps to capture Microsoft crash dump.

Pre-requisite
1) Machine should have ‘Debugging tools for windows’ installed, In this is not installed please download and install from following url:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
PS: The above package will install windbg, please note the path of windbg.exe we will use this to capture the crash dump.
Steps
1) Open registry using regedit.
2) Open following key “HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\AeDebug\”
3) Take the backup of the AeDebug registry key to restore your original settings once crash dump is captured.
4) To take backup right click on AeDebug and select ‘Export’ Menu option, specify the file name where this key will be exported.
5) Set the AeDebug\Auto key value to 1.
6) Set the Debugger key value to "<
>" -p %ld -e %ld -g -c ".dump /mfa c:\\dump%ld.dmp;q".
PS: Replace the angular bracket value with your actual windbg path.
7) On crash windbg will start and generate the crash dump file at c:\ with dump*.dmp name.
8) Restore your original settings by double clicking the file which we exported earlier.

No comments: