For developers answer is simple ... of course that we want to enable debugging! So you click OK button and everything works fine. But do you know where is it saved and what are the implications? If you are not sure then probably you should read this post carefully ;)
This part of web.config determines if debugging is enabled or not. Also this part will be changed if you click OK button. What are the implications beside the fact that you can debug the code? Well, literally, consequences are extremely HUGE, here comes a short list:
- The compilation of ASP.NET pages takes longer (since some batch optimizations are disabled)
- Code can execute slower (since some additional debug paths are enabled)
- Much more memory is used within the application at runtime
- Scripts and images downloaded from the WebResources.axd handler are not cached
Moreover, timeouts are turned off, which is necessary to debug the code but can be potentially very dangerous on production sever.
I don't want to write yet another post about debug="true" attribute, production servers and performance impact as there are already lots of really good posts about it, check at least those two:
- Scott Guthrie's blog - Don’t run production ASP.NET Applications with debug=”true” enabled
- aspalliance.com - The Infamous Debug=True Attribute in ASP.NET
But one additional thing is worth pointing out ... even if you forget about the debug="true" issue then you can do something on production servers to make sure that web.config settings will be ignored:
in machine.config file set:
You will disable the debug="true" switch, disable the ability to output trace output in a page, and turn off the ability to show detailed error messages remotely. Note that these last two items are security best practices you really want to follow (otherwise hackers can learn a lot more about the internals of your application than you should show them).
Debug mode disabled and timeouts
In the optimistic version, when debug is turned off you can control your application timeouts with this attribute:
executionTimeout specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.
But remember that:
This time-out applies only if the debug attribute in the compilation element is False.
I hope that this post made those things clear for you, check your configuration and make sure that web.config settings are not slowing your application down.