Microsoft KB Archive/923827

= Unhandled exceptions are caught by the Visual Studio JIT debugger instead of Dr. Watson or a third-party debugger after you install certain versions of SQL Server 2005 =

Article ID: 923827

Article Last Modified on 11/9/2006

-

APPLIES TO


 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Workgroup Edition

-





Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
Consider the following scenario:
 * You use the Dr. Watson program or a third-party debugger to catch unhandled exceptions that may occur when a program is running.
 * You install one of the following Microsoft products:
 * SQL Server 2005 Standard Edition
 * SQL Server 2005 Developer Edition
 * SQL Server 2005 Enterprise Edition
 * SQL Server 2005 Workgroup Edition
 * Any product that contains one of the previously listed products

(For example, you install Microsoft Windows Small Business Server 2003 R2 Premium Edition.)

In this scenario, later unhandled exceptions are caught by the Microsoft Visual Studio just-in-time (JIT) debugger. For example, if a Data Execution Prevention (DEP) exception occurs, a dialog box appears that requires user intervention to either start JIT debugging or ignore the exception.



CAUSE
This issue occurs because the SQL Server 2005 installation process calls the Visual Studio installation process. The Visual Studio installation process changes the default application debugger to the Visual Studio JIT debugger. This change occurs regardless of which debugger you previously used. You do not receive any notification that this change has occurred.



RESOLUTION
To resolve this issue, use either of the following methods. Use the method that is more appropriate for your situation.

Method 1: Re-enable the Dr. Watson program to catch unhandled exceptions
You can re-enable the Dr. Watson program to catch unhandled exceptions. After you do this, the Visual Studio JIT debugger will no longer catch unhandled exceptions. To do this, follow these steps:  Click Start, click Run, type cmd, and then click OK. Type the following command, and then press ENTER:

drwtsn32 -i



Method 2: Re-enable a third-party debugger to catch unhandled exceptions
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

If you were previously using a third-party debugger to catch unhandled exceptions, you can re-enable it. After you do this, the Visual Studio JIT debugger will no longer catch unhandled exceptions. To do this, follow these steps:  In a text editor such as Notepad, paste the following text. Paste only the text that is appropriate for the operating system.   32-bit operating system Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug] &quot;Auto&quot;=&quot;1&quot; &quot;Debugger&quot;=&quot;<DebuggerParameters>&quot; </li>  64-bit operating system <pre class="fixed_text">Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug] &quot;Auto&quot;=&quot;1&quot; &quot;Debugger&quot;=&quot;<DebuggerParameters>&quot;

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug] &quot;Auto&quot;=&quot;1&quot; &quot;Debugger&quot;=&quot;<DebuggerParameters>&quot; </li></ul> </li> Replace the  text with the correct values and parameters to start your debugger. See your debugger product documentation for more information.</li> On the File menu, click Save.</li> In the File name list, type debugger.reg .</li> In the Save in list, locate the folder where you want to save the Debugger.reg file, and then click Save.</li> Exit the text editor.</li> Locate and then double-click the debugger.reg file that you saved in step 5.</li> Click Yes when you are prompted.

Important Your debugger may require additional steps to re-enable it. See your debugger product documentation for more information.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
For more information about the Visual Studio dialog box that appears when an unhandled exception occurs, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/5hs4b7a6.aspx

For more information about how to enable and disable Dr. Watson for Windows, click the following article number to view the article in the Microsoft Knowledge Base:

188296 How to disable Dr. Watson for Windows

For more information about how to enable JIT-attach debugging in the Microsoft .NET Framework, visit the following MSDN Web site:

http://msdn2.microsoft.com/en-us/library/2ac5yxx6.aspx

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Keywords: kbdrwatson kbtshoot kbprb KB923827

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.