Skip to main content
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Michael Kassing and Simon Free and Steve Johnson
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Michael Kassing Simon Free ( @simonfree ) Steve Johnson ( @zombiefusion )

I Got Mentioned On The ColdFusion Weekly Pod Cast! (And A Note On Debugging)

By on
Tags:

Duuuuude! I just got mentioned on the ColdFusion Weekly Pod Cast. How freakin' cool is that! (( blushing )).

And yes, that is how you say my last name... Nadel : (nay) (dell).

I just wanted to make one comment on something that was mentioned on the show. Charlie Arehart was talking about FusionDebug and he mentioned that sometimes it is hard to debug, especially when in a ColdFusion component that does not allow output. This is very true. Now, it is not a great method (for obvious reasons), but I just wanted to stress stress stress that the following code will ALWAYS be visible:

<!--- Dump out message. --->
<cfdump var="This needs to be debugged:" />
<cfdump var="#Now()#" />
<cfabort />

Anything CFDump'ed out followed by a CFAbort tag will halt the page and display the page buffer on the screen. This works in a non-outputting Component / Method. Heck, this even works inside a CFSaveContent tag and that tag isn't even meant to put stuff in the page buffer at all.

I am sure there are times when this doesn't work, but I have yet to come across one. Of course, you do ABORT the page processing, but when you are trying to debug, this is not worst thing.

Want to use code from this post? Check out the license.

Reader Comments

50 Comments

Hi Ben, hope folks enjoy the podcast. I'd like to respond to your point: I would only argue that sometimes doing an abort is itself troublesome. Because it stops the request cold, it could keep the output being generated from being complete, which could keep the browser from rendering it. I could imagine times when even the table from CFDUMP would not render, though like you I can't say for sure. It will also stop any onrequestend.cfm from running, and it would fire the onerror of application.cfc.

I don't mean to be picking. You make a fair point. Still, I hope folks will consider the debugger, especially when you can't (or don't want) to edit the code. Especially now that the price has dropped and the new $99 version has been made available, as I pointed out on my blog.

15,663 Comments

Charlie,

I totally agree. CFDump / CFAbort does have its drawbacks, first and foremost of which, it kills the rest of the page. I just programmed in MX for a long time before I knew you could use it as a debugging technique inside of things the supressed output. I just thought it was cool and hoped maybe I could pass it on.

But yes, definately, people should have all the tools they can use to program better and most definately the more complex a system the less and less useful my technique will be.

50 Comments

Sure, and sorry. I didn't mean to take away from the value of the aspect of the tip you were sharing: that use of the CFABORT did at least permit seeing the output within a CFC/function with output=false. Cheers.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel