Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.3
Why can't I debug my ASPX page?

Q:

Why can't I debug my ASPX pages? 

A:

In order to be able to debug ASPX pages, ensure that web.config has Debug mode set to true (<compilation debug="true">). This setting is set to false by default.

What problems does leaving debug=true cause?

There are three main differences between debug=true and debug=false:

  1. ASP.NET Timeouts
  2. Batch compilation
  3. Code optimization

ASP.NET Timeouts

When debug is set to true, asp.net requests will not time out. This is to allow you to debug with visual studio at your own pace without having to worry about the requests suddenly disappearing. Of course in a production environment timeouts are crucial to avoid for requests to be stuck indefinitely, so this is reason #1 to make sure debug is set to false when the application is deployed into production.

Please refer to the blog entry below for more details on this issue: 

http://blogs.msdn.com/tess/archive/2006/04/13/575364.html