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



The information in this article 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 (included with the .NET Framework 1.1)
  • Microsoft ASP.NET (included with the .NET Framework) 1.0
  • Microsoft .NET Framework SDK 1.1
  • Microsoft .NET Framework SDK 1.0

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:
  1. Locate the \Web folder of the Duwamish application (for example, C:\Duwamish7-CS\Web).
  2. In a text editor such as Notepad, edit the Web.config file. Set the Duwamish.Web.EnablePageCache value to False as follows:
      <DuwamishConfiguration>
        <!-- Settings specific to the Duwamish application -->
        <add key="Duwamish.DataAccess.ConnectionString" 
           value="server=MDPKB2E141;User ID=Duwamish7_login;Password=password;database=Duwamish7;Connection Reset=FALSE" /> 
        <add key="Duwamish.Web.EnablePageCache" value="False" />
        <add key="Duwamish.Web.PageCacheExpiresInSeconds" value="3600" />
        <add key="Duwamish.Web.EnableSsl" value="False" />
      </DuwamishConfiguration>
    
  3. Use CLR Debugger to debug the Duwamish application. For more information, see the "More Information" section.

STATUS

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

MORE INFORMATION

Steps to Reproduce the Behavior

Set Up and Deploy the Duwamish Application

Install the Duwamish sample application. To do this, visit the following Microsoft Web site: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

  1. 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

  2. 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.
  3. Open the source file that you want to debug:
    1. In CLR Debugger, click Open on the File menu.
    2. Locate the \Web folder of the Duwamish application (for example: C:\Duwamish7-CS\Web), and then click Default.aspx.cs.
  4. On the Tools menu, click Debug Processes.
  5. In the Processes dialog box, select the Show system processes option.
  6. 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.
  7. Set a break point in the source file. To do this, do one of the following:
    • Select the line where you want to set the break point, and then press F9.

      -or-
    • Click in the margin next to the line where you want to set the break point.
  8. 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.
  9. 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.
For more information about Microsoft CLR Debugger, visit the following Microsoft Web sites: 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


Modification Type:MajorLast Reviewed:8/22/2003
Keywords:kbCaching kbArchitecture kbConfig kbDebug kbbug KB814796 kbAudDeveloper