PRB: Debugger Fails to Hit the Breakpoint When You Debug an ASP.NET Web Application a Second Time (316970)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
This article was previously published under Q316970 SYMPTOMS When you debug an ASP.NET Web application, the debugger may
successfully hit the breakpoint (on an erroneous line of code) only the first
time. On subsequent runs, the debugger may fail to hit the breakpoint, and you
receive a server error page. CAUSE For performance reasons, the ASP.NET worker process,
Aspnet_wp.exe (or W3wp.exe for applications run on IIS 6.0) caches the error
information after the first debug session. If you try again to debug and do not
make any changes in the code, the breakpoint is skipped. This
behavior occurs because Aspnet_wp.exe determines that the code is redundant and
then Aspnet_wp.exe displays only the cached error page.RESOLUTION To resolve this issue, you need to force a reload of the
pertinent .dll file into aspnet_wp.exe (or w3wp.exe for applications run on IIS
6.0). To do this, recompile the project before you debug again. However, the
project cannot be recompiled unless you make changes to the code. Therefore,
restart Microsoft Visual Studio .NET, and then click Rebuild All. (Alternatively, you can run the iisreset command from the command prompt.) Now, when you run the debugger
again, it hits the breakpoint. REFERENCESFor additional
information about how to debug ASP.NET Web applications, click the article
numbers below to view the articles in the Microsoft Knowledge Base: 306172 INFO: Common Errors When You Debug ASP.NET Applications in Visual Studio .NET
306169 PRB: Visual Studio .NET Debugger Does Not Stop on Breakpoints When You Debug ASP.NET Pages
Modification Type: | Minor | Last Reviewed: | 7/15/2003 |
---|
Keywords: | kbDebug kberrmsg kbHttpRuntime kbide kbprb KB316970 kbAudDeveloper |
---|
|