How to make my code creating dump file before crash?

后端 未结 3 2075
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 12:23

I have some code in C# and C++ ( in one project ). This code have some crash and i trying t find it. but this crash is not reproduce any time - and i can\'t find it.

相关标签:
3条回答
  • 2021-02-06 12:42

    You can register an unhandled exception filter and PInvoke MiniDumpWriteDump. A code sample to do that is located here

    0 讨论(0)
  • 2021-02-06 12:51

    I find it easier to use ProcDump. Try the -e (create dump on unhandled exceptions), -ma (w/ full process memory), and -t (create dump on app termination) options.

    0 讨论(0)
  • 2021-02-06 12:57

    You can enable saving dumps on vista in the registry:

    1. Open RegEdit
    2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
    3. Under Windows Error Reporting, create a new registry key named LocalDumps.
    0 讨论(0)
提交回复
热议问题