Dr Watson

Revision as of 19:41, 21 October 2007 by Alexander Kogtenkov (Talk | contribs) (Unmanaged application: Added a note how to disable visual notification from Dr.Watson)

Quite useful when running eweasel is the ability to disable those intempestive dialogs that shows up when your application crashes asking if you want to debug it. This can be disabled by doing two things, one for managed application, one for unmanaged application.

Unmanaged application

In theory, editing the key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\Auto

so that it reads 0 instead of 1 should do the trick (0 means disabling it, 1 activating it).

However we noticed that it does not always work. If this is your case, then reset `Auto' to 1 and then rename `Debugger' into `Debugger-old' and create a new `Debugger' empty key. Then it should not prompt you at all.

If it still does, it should be possible to disable a dialog from Dr.Watson utility (to be run as an administrator):

  1. Install Dr.Watson as your default debugger:
    drwtsn32 -i
    Usually it writes the following value to the Debugger registry key: drwtsn32 -p %ld -e %ld -g
  2. Run drwtsn32, clear Visual Notification check box and press OK.

Managed application

Edit the key:

HKEY_LOCAL_MACHINE\Software\Microsoft\.NetFramework\DbgJITDebugLaunchSetting

so that it reads 0x1. The meaning of the value is described below:

  • 0x0 = Bring up the unhandled exception dialog box. (Click OK to terminate ...)
  • 0x1 = Print out the stack trace of the exception and terminate the application
  • 0x2 = Invoke the default managed debugger
  • 0x10 = only for the .NET Framework version 2.0, the runtime presents the message box described above for processes that are interactive with the desktop. For processes that are not interactive, the runtime spawns the debugger listed in the DbgManagedDebugger registry key.

You can get a more detailed explanation from MSDN.