The Return of the ColdFusion Debugger
I think around the time of ColdFusionMX 6, the inline CF debugger went downhill. It became incredibly slow to the point of being unusable on many applications. It became common knowledge to simply disable it because it could very quickly bog down a CF server.
A couple years ago I wrote my own version of the inline debugger and have been using it locally ever since. What I found is that the reason it is so slow is the file/function tree. It’s a recursive tree that on sites with tons of method calls can very easily have hundreds, sometimes thousands (no joke) of nodes in the tree. Specifically in applications with frameworks containing ‘core files’. It really wasn’t the debugger itself that is slow, IMO, it just happens to be slow on pages that have an enormous number of code dependencies.
But I have found that the file tree really didn’t help me debug anything at all. So I’ve scraped that in the version I’ve been using. On the other hand, one of the truly useful things in the out of the box debugger are the list of queries run on a given page. What’s NOT useful about the queries are listing out the cfqueryparams outside of the SQL. Commonly when I’m trying to figure out why something isn’t working, I like to copy/paste a sql statement into sql server’s enterprise manager or sqlyog for mysql. But it’s a big pain to do that with a bunch of query params. So in the one I’ve been using I added some string parsing to replace the ?s with the actual values. I also added a tabbed user interface and collapsible queries and a few other minor fixes for annoyances.
I’m bringing this up because I started working on my debugging template again. I’m going for a ton of new functionality. One of the first things I’m going to tackle is to incorporate unit testing right into my inline debugger. I find both cfunit and cfcunit are fair, but I’ve never been thrilled with either. They are missing a lot of obvious (to me) low hanging fruit and some other not-so-obvious but important tools for testing.
I haven’t thought this through, but I like the idea of adding a tasks tab to the inline debugger. Maybe one that’s connected to FogBugz. Maybe a project scheduler. Who knows.
Anyway, I thought I’d throw this post out to the world. I might make this an open source project, but that tends to be a lot of work. We’ll see.

hey Steve,
Looks like we’ve done some of the same things with the classic debugger (http://cfzen.instantspot.com/blog/2007/03/26/Improved-Classic-CF-debugging-template). I didn’t like the file tree either, so added one that shows the *actual order* that the files ran, which help immensely in debugging inherited code
btw – your blog software doesn’t seem to allow email addresses with plus signs (http://cfzen.instantspot.com/blog/2008/04/30/Does-your-email-validation-allow-plus-signs)
Comment by Aaron Longnion — October 21, 2008 @ 12:00 am
Yeah no doubt. I added a few more ‘fixes’ like added a dump of the records for the queries (I limited it to the first 20 records) and made the queries collapsible.
I’m really starting to rethink the power of this inline debugger. It surprises me that none of us have vastly improved it.
Comment by Steve Nelson — October 21, 2008 @ 12:00 am
If you haven’t yet, take a look at http://www.fusion-reactor.com/fd/ for a commercial CF line debugger. It’s base IDE is Eclipse. Maybe there is an idea or two you could pick up from evaluating it.
Comment by Robert — March 27, 2009 @ 9:12 am
Hey Steve, should there be a link somewhere here to the debugging template you refer to here? Or by “throwing this out here” did you maybe just mean the idea? Or did you ever open source it? You referred also to some other ideas you had for more improvements. I looked for other entries tagged with “debugging” and don’t find any. Just wondering where things may stand on this project. Sounds interesting.
Of course, there are still other variants of people creating debugging output template mods, and in fact I plan to add a list of them to my cf411.com site, and would like to add a pointer to this one if/when it becomes available, or will at least point to the entry for the useful thoughts. Thanks.
Comment by charlie arehart — December 19, 2009 @ 6:23 pm
Nope. I never open sourced it. It was just too much work for too little reward.
Comment by Steve Nelson — December 19, 2009 @ 6:31 pm
As a follow up to my last comment above, I did go ahead and create a list of other CF debugging output template alternatives:
CFML Debugging Output Mods
http://www.cf411.com/#debugoutput
Steve, if you ever get motivated to release or just post here the code you did, let me know and I’ll add it to the list. BTW, it doesn’t need to be put in riaforge or anything for me to list it. I point to several blog entries that just offer attachments, so that’s cool if it’s all you ever end up doing.
Otherwise, I leave the link above to help people who may want to find some alternative debugging output templates like the one Steve alluded to.
Comment by charlie arehart — March 12, 2010 @ 2:14 pm