Wednesday, August 21, 2013

Disable dialog asking to debug or close program

This dialog is quite pesky if your unit tests run automatically and one of them crashes. Instead of the test executor being notified about the crash, the unit test sits there forever waiting for the user to react. Of course the test executor could implement a timeout and shoot the process down. Another option is to disable the dialog. Just add the following to your registry: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug] "Debugger"="drwtsn32 -p %ld -e %ld -g" "Auto"="1" This activates Dr. Watson as the automatically selected debugger. Dr. Watson will create a crash dump for post-mortem debugging. Alternatively you can select some other debugger or tool, but you can't leave it empty for the solution to work.