Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened. But I have become a passionate and pretty good web developer. I code mostly in ColdFusion and jQuery. Sam is a DZone MVB and is not an employee of DZone and has posted 16 posts at DZone. You can read more from them at their website. View Full User Profile

debugClean, a ColdFusion Builder Extension to Check for Debug Free Code

  • submit to reddit
Recently I wrote some code that ran beautifully on my machine. So beautiful in fact that if it was a painting it would be the Mona Lisa. I pushed it to stage and no one could get it to run.

The reason?

I had left in a console.log and cfdump output to file. The staging environment didn't like this one bit and laughed at my suggestion of the code being like the Mona Lisa.

So, I wrote ColdFusion Builder extension to check for debug code and called it debugClean. Its now up and downloadable on RIAForge. Full description:


Checks a file or folder for any debug code that should probably be stripped before moving to staging or production.

Looks for ColdFusion tags: - cfdump - writeDump - cflog - writeLog

Looks for JavaScript: - console.log

The tags and functions it looks for can be configured to your taste in the _config.cfm file.

Go get it, install it and only push our production ready code!

Published at DZone with permission of Sam Farmer, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Emma Watson replied on Fri, 2012/03/30 - 6:12am

Could this be ported as a cfadmin extension? To allow it to work from there? Because this does sound very useful. But I don't use cf9 or cfbuilder.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.