Thursday, March 18, 2010

Troublehsoot applications on Windows

I am looking at the ways to troubleshoot windows application crash. When a program error occurs in windows, the system will try to find a program error handler. If the error is not handled, the system will try to process un-handled errors by looking at registry: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug. If the Auto name entries, it will pop up a message box and need user to confirm. The Debugger specifies the which debug application will be used.
  • Dr. Watson (drwtsn32): The debug tools that can create system log and core dump files. You can enable it by running "drwtsn32 -i"
  • userdump.exe : This will work in Windows 7.
  • In Windows 7, The Dr. Watson is replaced with the "Action Center", so you have to do following:
    • Run Task Manager  
    • Go to Processes tab and right-click on the crashed process
    • Select the Create Dump File item;Select the Create Dump File item
    • Pick the .DMP file created;
    • Open Start->Run, type %USERPROFILE%\AppData\Local\Microsoft\Windows\WER\ReportArchive string and hit Enter;
    • After that you will see a folder (or a few folders), the name of which starts with "Report"
    • Collect the Report.wer file from the last created folder.

No comments: