Detecting ASP.NET Debug mode
Posted by: Rick Strahls WebLog,
on 20 Jan 2007 |
View original
Ah the beauty of a big framework <s>. I was doing some work on an internal GZip compression handler and one thing I needed to know is whether the application is running in Debug mode. Its easy to do this IF you know where to look:
// *** Optimize the script by removing comment lines and stripping spaces
if (!HttpContext.Current.IsDebuggingEnabled)
Script = OptimizeScript(Script);
It...