How to enable/disable user dumps

Downloads

See a faster way to do this using IFix , read the blogpost here 

OR

Get the userdump registry files here: Download here

Description

If you have an application crashing on you, in particular one of your own design – and in production –  enabling user dumps allow you to grab the state of the application at the time of the crash.  This dump can be directly opened in Visual Studio, where you can see the modules loaded, and then starting a debug session you get the call stack, and threads running.    If you also have the corresponding pdb files you can go directly to – literally-  the source of the problem.

To get the dumps, you must enable local dumps on your machine – or the machine where the issue happens. You do this using by setting a registry key at:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]

and you use two settings:

DumpType, a DWORD, where value= 2 is enable full dump, and 0 is disable.

DumpFolder, a string, where you can set the location where you want the dumps to be collected.

You can use the RegEdit program to set these, or use reg file scripts.

 

I have made two reg files, which can be run directly from a command prompt, to enable and disable the local dumps.  The folder path is set to D:\CrashDumps, so if that is not suitable to you, you can change to whatever you like.  The files are text, and easily edited.

If you run the scripts directly they will prompt you, if you want it silently then:

regedit /s EnableDump.reg

regedit /s DisableDump.reg

Further there is a test program to verify that the crash dumps settings you have set actually works – if enabled, or not – if disabled.

Running the program, just called Crash, give you this sequence:

and the following output:

And if you then look in the given dumpfolder:

Grab the package from the github release download link at the top..

Links:

Github project site

MSDN post on User Dumps