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

前端 未结 3 1777
情话喂你
情话喂你 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:24

    If you are looking a way for handling crash on customers side the best solution is using google-breakpad library. In your case exception handler will write dump files on the disk.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-01-06 18:32

    Microsoft's DebugDiag tool is quite useful for monitoring processes and spitting out dump files on exceptions and crashes.

    http://www.microsoft.com/en-us/download/details.aspx?id=26798

    I've used this in multiple customer environments to track down problems that I could not reproduce in my own environment.

    0 讨论(0)
提交回复
热议问题