VB and VBA Users Source Code: Configuring Dr Watson (inc. how to disable)
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Configuring Dr Watson (inc. how to disable)
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Thursday, March 01, 2001
Hits:
747
Category:
Visual Basic General
Article:
The following registry key controls which application handles your application faults: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug Here you will see the keys "Auto", "Debugger" and "UserDebuggerHotKey". 1. "Auto" specifies if the debugger is started automatically. If the value of the Auto entry is 1, this debugger is started automatically. If the value of Auto is 0, the user must start the debugger. 2. "Debugger" is of type REG_SZ and is the name of debugger and any switch settings. The default value for this key is "drwtsn32 -p %ld -e %ld -g", but if you have installed visual studio the value will probably be "C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\msdev.exe" -p %ld -e %ld". To disable Dr Watson, first export the above registry sub key, and then delete it. If you wish to restart Dr Watson simply run the command line drwtsn32 -i, then run the exported registry file. In addition to the above, you can configure Dr Watson's behaviour by placing entries in the following sub key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DrWatson Alternatively, run drwtsn32.exe (Press the windows key + r then type drwtsn32). This application places entries in the above registry sub key. These entries specify how the Dr. Watson notifies the user of an application error, and how its log file and crash dump file are configured. Notes: 1. The above registry sub key will not be created until you run drwtsn32.exe for the first time. 2. To prevent Dr Watson from showing set the VisualNotification key to 0. 3. To force you application to raise an application fault (or GPF) see the article "http://www.vbusers.com/code/codeget.asp?ThreadID=9&PostID=1&NumReplies=0". 4. The default command line switches for Dr. Watson are set as follows: Value and Meaning -p Stores the Process ID for the running process at the location specified by %ld. -e Stores the Event ID for the running process at the location specified by %Id. -g Tells the debugger to go (start).
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder