0

Ok, That's Cool. CF8 Debugging Tools

ColdFusion 8

Until I started working with AJAX (and Flex) I never saw the need for more of a debugging tool than cfdump. Having struggled debugging tough problems and wondering  what exactly was going on I now see the need and two new ColdFusion 8 tools make my life much easier. First, enter the JavaScript based "ColdFusion AJAX Logger" which is based on the YUI Logger with some extra features for CF coders. The ColdFusion AJAX Logger will show all the AJAX activity going on between the browser and the server; requests made, the JSON response, etc. And even better if ColdFusion returns an exception the cfdebug window will show this:

ColdFustion Ajax Logger

How do you turn it on? Permissions for it are set in the CF Administrator once turned on simply add cfdebug= to the URL. It is also possible to send JavaScript messages to it by writing ColdFusion.Log.Dump(obj). This works almost exactly like cfdump and is a nice alternative to alert boxes.

But what if you want more? Then enter the Eclipse based ColdFusion Debugger. Until I used this I never understood why people liked debuggers. Now I do. And, wow, it provides more information than you know what to do with. Here are all the variables shown from a breakpoint placed in a very simple file:

ColdFusion Debugger Variables

The scopes to show can be customized (Preferences > ColdFusion > Debug Settings) and include: application, arguments, attributes, caller, cgi, client, cookie, form, flash, function_variables, request, server, session, thistag, url, variables. And even better check the option to 'Break on a CFML runtime exception' and then next time an error occurs this will happen:

CF Exception

Click OK and this comes up with all the variable information and an arrow on the left to indicate the line of the error:

Exception with Arrow

Oddly enough it does not show a dump of the error information (and enhancement for 9?) but will show all the variables and values which should give enough information to easily debug the bug.  The download can be found here (ColdFusion 8 Extensions for Eclipse) and installation instructions here .

Overall these two debugging features emphasis the point of what a well rounded release ColdFusion 8 is.

tags:
ColdFusion 8
Raymond Camden said:
 
I just wanted to add - there are more ways - via JS - to send info to the debugger than just the dump. You can also send messages and specify the group of the message, etc. I love this feature. :)
 
posted 330 days ago
Add Comment Reply to: this comment OR this thread
 
 
Good point Ray. I've read the docs but not used anything other than ColdFusion.Log.dump. For reference they are:

ColdFusion.Log.debug
ColdFusion.Log.error
ColdFusion.Log.info
 
posted 329 days ago
Add Comment Reply to: this comment OR this thread
 

Search

About Me
I am a 32-year old Web Developer specializing in ColdFusion. I live and work in downtown Washington, DC with my wife and daughter. I work for Interfolio where we help people collect, deliver and showcase their life's work. Read more About Me

2007 CFeMmy Best Newcommer winner
As voted on by fellow CF Bloggers.