A suggestion has been made by a team member to leave all debug code intact in our web pages... and then to create a variable that can be turned on / off to enable / disable debugging.  This is a technique we use in some of our low level, non web code.Just wondering if anyone had any comments on how they've implemented something similar for web applications?  Some of our web applications are written in lua, and others in PHP. I like the idea and I've seen it used in different types of solutions.  However, my knee-jerk reaction is that for web apps, it might not be such a great idea.  I don't want to have a tonn of logs generated on the web server. At the same time, it'd be nice to simply enable a variable and then start collecting information.  The alternative could be to always have a test page that calls the same methods that the production page does, but the test page dumps a bunch of data to the screen.  Just wondering if anyone has any experience / comments on doing this for the web as far as how to build it in, how difficult it is to maintain etc.Thanks. 
debugging web applications using debug parameter
php;debugging;logging;lua