Generating .NET crash dumps automatically

后端 未结 7 2147
清酒与你
清酒与你 2020-11-28 06:57

I know how to generate Crash Dump files with ADPlus or DebugDiag, but I\'m wondering if there is a way to do this on a customer\'s computer without installing these tools...

相关标签:
7条回答
  • 2020-11-28 07:22

    You can configure Windows Error Reporting (WER) to create a crash dump in a specific directory using the following registry script:

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
    "DumpFolder"="C:\\Dumps"
    "DumpCount"=dword:00000064
    "DumpType"=dword:00000002
    "CustomDumpFlags"=dword:00000000
    

    The dump will go into C:\Dumps with a name that reflects the name of the process that crashed. DumpType=2 gives a full memory dump. DumpType=1 gives a mini dump. On 64 bit machines, you do not need to put these under the Wow32 nodes. WER only uses the non-WOW registry key specified above.

    Depending on the type of crash, this method may not work. I have yet to figure out why or which crash types it doesn't catch. Anyone?

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