Microsoft KB Archive/814796

= BUG: CLR Debugger Does Not Hit the Break Point After the First Pass When You Debug an ASP.NET Application =

Article ID: 814796

Article Last Modified on 8/22/2003

-

APPLIES TO


 * Microsoft Common Language Runtime (included with the .NET Framework 1.1)
 * Microsoft Common Language Runtime (included with the .NET Framework) 1.0
 * Microsoft ASP.NET 1.1
 * Microsoft ASP.NET 1.0
 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2
 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2

-



SYMPTOMS
When you use Microsoft CLR Debugger (DbgClr.exe) to debug the Duwamish 7.0 tutorial in ASP.NET, the break point works only the first time on the Default.aspx page. When you load the Default.aspx page in the Web browser later, the debugger does not stop at the break point.



WORKAROUND
To work around this problem, set the page cache to False in the Web.config file of your application. The Duwamish tutorial demonstrates how to work around this problem. To do this, follow these steps:  Locate the \Web folder of the Duwamish application (for example, C:\Duwamish7-CS\Web).  In a text editor such as Notepad, edit the Web.config file. Set the Duwamish.Web.EnablePageCache value to False as follows:        Use CLR Debugger to debug the Duwamish application. For more information, see the &quot;More Information&quot; section.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

<div class="moreinformation_section">

Set Up and Deploy the Duwamish Application
Install the Duwamish sample application. To do this, visit the following Microsoft Web site:

http://msdn.microsoft.com/library/en-us/dwamish7/html/vtorisinglemachinesetup.asp

Note If the Microsoft .NET Framework SDK is not installed on your computer, install the Microsoft .NET Framework SDK before you set up the Duwamish application.

Use CLR Debugger to Debug the Application
 Start CLR Debugger.

CLR Debugger (DbgClr.exe) is located in the folder where you installed the Microsoft .NET Framework SDK. By default (and depending on whether you installed the .NET Framework SDK separately or as part of a Microsoft Visual Studio .NET installation), the path of this folder is one of the following:

C:\Program Files\Microsoft.Net\FrameworkSDK\GuiDebug

-or-

C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\GuiDebug

When you install the Microsoft .NET Framework 1.1, DbgClr.exe is located in the following folder:

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\GuiDebug

</li> In a Web browser, locate the application by typing http://localhost/Duwamish7/default.aspx in the browser address bar. This step verifies that the Aspnet_wp.exe process (or the W3wp.exe process, if your application is deployed on Microsoft Internet Information Services (IIS) 6.0) is started.</li> Open the source file that you want to debug:  In CLR Debugger, click Open on the File menu.</li> Locate the \Web folder of the Duwamish application (for example: C:\Duwamish7-CS\Web), and then click Default.aspx.cs.</li></ol> </li> On the Tools menu, click Debug Processes.</li> In the Processes dialog box, select the Show system processes option.</li> Double-click Aspnet_wp.exe (or W3wp.exe, if your application is deployed on IIS 6.0), and then verify that Aspnet_wp.exe (or W3wp.exe) appears in the Debugged Processes list. Close the Processes dialog box.</li> Set a break point in the source file. To do this, do one of the following: <ul> Select the line where you want to set the break point, and then press F9.

-or-</li> Click in the margin next to the line where you want to set the break point.</li></ul> </li> In a Web browser, load the Default.aspx file by typing http://localhost/Duwamish7/default.aspx in the browser address bar.

CLR Debugger stops on the break point. You can step through the code from this point.</li> Click Refresh or load the Default.aspx page again by typing the URL http://localhost/Duwamish7/default.aspx in the browser address bar.

Notice that CLR Debugger does not stop at the break point in the Default.aspx page.</li></ol>

<div class="references_section">

For more information about Microsoft CLR Debugger, visit the following Microsoft Web sites:

http://msdn.microsoft.com/library/en-us/dwamish7/html/vtoriSetupDeploymentOfDuwamish70.asp

http://msdn.microsoft.com/library/en-us/netstart/html/vcoriTheCOM20SDKDebugger.asp

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

301058 HOW TO: Debug an ASP.NET Application with the Microsoft CLR Debugger

Keywords: kbbug kbcaching kbarchitecture kbdebug kbconfig KB814796

-

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

© Microsoft Corporation. All rights reserved.