Collect crash .dmp and .hdmp files after a crash of C++ service and a user-mode app

前端 未结 3 1806
情话喂你
情话喂你 2021-01-06 18:07

I\'m coding in C++/MFC using WinAPIs. My software consists of a local service and a user-mode app that provides user interface for a logged in Windows user. I\'m looking for

3条回答
  •  暖寄归人
    2021-01-06 18:27

    Windows 2000 and XP already save crash dumps using DrWatson. Running drwtsn32.exe allows you to get/configure the path to the log and the dump files.

    Windows Vista+ only uses WER, which doesn't save a dump by default, but you can enable creation of user mode dumps.
    I set the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpType value to 2 to save full dumps which, by default are stored in %LOCALAPPDATA%\CrashDumps (C:\Users\dee.earley\AppData\Local\CrashDumps).

    Installing a debugger like WinDebug will also allow you to catch exceptions from user mode apps and the service as they occur.

提交回复
热议问题