Conditional Debugging

We’ve all had to embed debugging code into our pages only to have to take it all out, and then reinsert it again. The new ColdFusion IsDebugMode() function lets you programmatically determine if debugging is enabled, allowing you to leave debugging code in your pages knowing that it’ll only be executed when debugging is enabled. (Of course, you should use this technique only during development, when you deploy the finished application you’d not want the unnecessary overhead, no matter how minimal). (Applies to: ColdFusion 4.5 (or later))

Leave a Reply