Registry keys to configure Watson and automatically save full dumps locally
You might have noticed that after installing Visual Studio the behavior of crashing programs changes – instead of the standard crash dialog you get the Visual Studio Just-In-Time Debugger:
AeDebug
The behavior of handling crashing programs can be controlled in the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"="\"C:\\windows\\system32\\vsjitdebugger.exe\" -p %ld -e %ld"
"Auto"="1"
https://technet.microsoft.com/en-us/library/cc939483.aspx
If Auto is not set or is set to 0, you get to choose whether to attach a debugger or not:
If Auto is set to 1, the JIT debugger dialog starts without the prompt above. Visual Studio sets the debugger to vsjitdebugger, which in turn lets you start a Visual Studio instance and attach to the crashing process.
Windows Error Reporting
Another useful registry branch that deals with watsons is:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\DebugApplications]
"w3wp.exe"=dword:00000001
"aspnet_wp.exe"=dword:00000001
"devenv.exe"=dword:00000001[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpFolder"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,\
00,41,00,54,00,41,00,25,00,5c,00,43,00,72,00,61,00,73,00,68,00,44,00,75,00,\
6d,00,70,00,73,00,00,00
"DumpCount"=dword:00000005
"DumpType"=dword:00000001
Here’s a good MSDN article that describes these options:
https://msdn.microsoft.com/en-us/library/bb513638.aspx
To turn it off, set DontShowUI to 1 and set Disabled to 1 to stop sending reports to Microsoft.
Local Dumps
LocalDumps is interesting. It configures Watson to automatically save a dump of the crashing process in the folder you specify and keep N latest dumps in that folder:
This is really useful if the process doesn’t show the Watson dialog, you can still get the dump for it. Just open your %LOCALAPPDATA%\CrashDumps folder and you’ll see the latest N dumps (I’ve set it to 32). DumpType is 1 for minimal, 2 for full.
Comments
- Anonymous
December 18, 2013
Regarding HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsWindows Error ReportingLocalDumps, please note that this only works for managed apps with .Net 4 and up. It has no effect on early versions.