Using Dr. Watson
Dr. Watson is the built-in debugger that is included with Windows XP, Windows 2000 and Windows Server 2003. This debugger is named drwtsn32.exe.To configure Dr. Watson on your system:
- On your Windows system, click Start.
- From the menu that appears, select Run.
- In the Run window, type drwtsn32.
- Click OK.
The Dr. Watson window appears:
The following table describes the fields and check boxes that you can modify in this window:
|Log File Path||The path of the log file created when a program crashes. This log file, and the map file generated while building the program, can be used to find the cause of the problem.The user that is running the program must have write access to this folder, or a File Open dialog box will open when when the program crashes.|
|Crash Dump||The location of the dump file created when a program crashes. You can use WinDbg to examine this file, along with the PDB file generated when building the program, to find the cause of the problem.Because WinDbg provides a visual environment that is similar to Visual Studio to inspect the crash, it is often easier to use the crash dump file to find the cause of the problem than to use the log file.The user that is running the program must have write access to this folder, or a File Open dialog box will open when when the program crashes.The Create Crash Dump File check box must be selected for a crash dump to be generated.|
|Number of Instructions||This specifies the number of assembly instructions to be recorded for each thread when an application error occurs. Setting this value to 10 is usually sufficient.|
|Number of Errors To Save||This is the maximum number of errors saved to the log file. Setting this value to 10 is usually sufficient.|
|Dump Symbol Table||Specifies that the symbol table is to be dumped. You do not normally need to select this check box, as a symbol table is provided in the map and PDB files. If this check box is selected, the log file can become very large.|
|Dump All Thread Contexts||Provide data for all threads. This check box should be selected, as it can provide useful information about what else was happening when the program crashed.|
|Append To Existing Log File||Append log data to an existing log file. If this check box is selected, the log file can become very large.|
|Visual Notification||If this check box is selected, a dialog box appears when a crash occurs. For Iguana, this check box can be kept unselected, as displaying this dialog box keeps Iguana from restarting if service recovery settings are being used.If you do not dismiss this dialog box (by pressing OK), it automatically disappears after 5 minutes.|
|Sound Notification||Provide audio notification when a crash occurs. This check box can normally be kept unselected.|
|Create Crash Dump File||Specifies that a crash dump file is to be created when a crash occurs.|
Click the Help button for more information on these settings and the log file.
After you have configured Dr. Watson, you must install it. To install Dr. Watson, open a Command Prompt window and type drwtsn32 -i. Then, restart the program that you want to debug.
When Dr. Watson is installed, a log file named drwtsn32.log is created when the program crashes. If Create Crash Dump File has been selected, a crash dump file is also created.
For more information on Dr. Watson, see the following resources: