Detecting ASP.NET Debug mode - Rick Strahl
http://www.west-wind.com/weblog/posts/2007/Jan/19/Detecting-ASPNET-Debug-modeDon’t run production ASP.NET Applications with debug=”true” enabled - ScottGu
http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspxASP.NET Memory: If your application is in production… then why is debug=true
http://blogs.msdn.com/b/tess/archive/2006/04/13/575364.aspx/debug (C# Compiler Options)
http://msdn.microsoft.com/en-us/library/8cw0bt21.aspxDebugger.IsAttached Property
http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.isattached.aspxHttpContext.IsDebuggingEnabled Property
http://msdn.microsoft.com/en-us/library/6xkyw262%28v=vs.80%29.aspxIf you use Reflector to view the source for HttpContext.IsDebuggingEnabled you'll see that it looks in your current web.config using code more-or-less like this:
System.Configuration.Configuration config = WebConfigurationManager.OpenWebConfiguration(null);
return ((SystemWebSectionGroup)config.GetSectionGroup("system.web")).Compilation.Debug;