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

Posted October 5, 2006 at 8:41 AM by Ben Nadel

Tags: ColdFusion

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.



Reader Comments

Oct 7, 2006 at 7:24 PM // reply »
15 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.


Oct 8, 2006 at 9:43 AM // reply »
10,743 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.


Oct 8, 2006 at 1:29 PM // reply »
15 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.


Oct 8, 2006 at 8:24 PM // reply »
10,743 Comments

No worries dude, after your whole CFHttp / CGI variable naming comment from 2004... you can do no wrong :)


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
InVision App - Prototyping Made Beautiful With Prototyping Tools Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 21, 2012 at 1:58 AM
Updated: Converting A ColdFusion Query To CSV Using QueryToCSV()
Hi Ben, why do you need to have so many double quotes when adding the field and field name to the row data? ----------------------------------------- <cfset LOCAL.RowData[ LOCAL.ColumnIndex ] = ... read »
AXL
May 21, 2012 at 1:24 AM
URL Rewriting And ColdFusion's WriteToBrowser Image Functionality (CFFileServlet)
@Mounir, Open your lower case URL Rewrite rule and add the following condition. Condition input: {REQUEST_URI} Check if input string: Does Not Match the Pattern Pattern: ^/CFFileServlet/_cf_ca ... read »
May 20, 2012 at 4:28 AM
Understanding The Complex And Circular Relationships Between Objects In JavaScript
@Will Vaughn I tried your javascript example but got this error:- foo.print is not a function ... read »
May 19, 2012 at 5:37 AM
A Graphical Explanation Of Javascript Closures In A jQuery Context
Thanks for this article, but I fear you missed an important point. If variables in the outer context change, these changes affect the inner anonymous functions as well. That means: if you change the ... read »
May 18, 2012 at 3:39 PM
Parsing CSV Data With An Input Stream And A Finite State Machine
Can you use file upload button with this? and read live? or does the file have to already be on the server saved? ... read »
May 18, 2012 at 1:06 AM
VIRGO (Aug. 23-Sept. 22): Dead On The Money!
A friend of mine and I were arguing about astrology and she told me that he believes in astrology. She hasn't provided me with any evidence that the belief makes any sense to me. She she been telling ... read »
May 17, 2012 at 11:32 PM
Using ColdFusion to Handle 404 Errors (Page Not Found) On Development Server
Very easy the configuration. I read a lot pages and I can't find the solution. I open the administrator and change this Administrator/server settings/Error Handlers/Missing Template Handler and p ... read »
May 17, 2012 at 3:13 PM
LOCAL Variables Scope Conflicts With ColdFusion Query of Queries
I never cease to be amazed that almost EVERY random CF issue I come across lands me on your site. Thank you for documenting your findings for the world. ... read »