I'm deploying a precompiled and all-page-merged website using Web Deployment Projects on Visual Studio 2008. Note that all assemblies and projects have been compiled in Release mode.
All my pages are pre-compiled in release mode. So they wont be recompiled, they'll just be loaded by runtime. In that case when the page compilation is not required, Setting <compilation debug="true">
in system.web will make any difference ?
Check out the excellent links below:
Basically:
None of the above is desirable. You will find more disadvantages in the above links.
From the blog post ASP.Net – Never again fear publishing your website with debug=true:
The article goes on to recommend setting the production server machine.config to ensure retail deployment mode is forced which essentially means debug is always false.
According to the documentation:
However, having just quickly reflected through System.Web, I can see the debug flag is used (directly or indirectly) by the following:
As a result, if your site is precompiled you will not receive a performance hit. However, as the HttpApplication will respond to the DEBUG http verb, you open yourself up to security problems.
In short, set debug=false, even if your site is precompiled.
Edit: debug=true will result in a performance (see Mehmet Aras's answer) hit for caching and no execution timeout, but it will not reduce execution speed for compiled pages.