Ah the beauty of a big framework. 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. It’s easy to do this IF you know where to look:
// *** Optimize the script by removing comment lines and stripping spaces
Script = OptimizeScript(Script);
It took me a while to find this - I was expecting to find this on the HttpApplication object. Didn't have much luck with searching either when finally I stumbled onto it above on the Context object.