Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8904683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:11:44+00:00 2026-06-15T02:11:44+00:00

Possible Duplicate: How to do a cfdump inside a cfscript tag? I’m new to

  • 0

Possible Duplicate:
How to do a cfdump inside a cfscript tag?

I’m new to Coldfusion and wondered if anyone knew of a way to access function when inside a script block. I cant find way of calling it from there.

Why have Adobe removed it? Or have they just called it something else now?

Sorry – I know this is probably really basic question, but like I said I’m new.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:11:46+00:00Added an answer on June 15, 2026 at 2:11 am

    writeDump()

    Apparently in ColdFusion 9 it has been added as writeDump() so you should be able to use this from a cfscript block.

    So if you have CF9, then you are fine.

    If you using an older legacy system which does not support this newly introduced writeDump() function, as we are, you could write a wrapper for it and put it somewhere accessible to all your files.

    This is the wrapper I have written, which for short term debugging use can be put on the cfc file you are working on (although remove it before you commit your code – otherwise it’s just a mess), or you can put it somewhere global so you can call it from shared scopes.

    Here is an example of a wrapper function you can use:

    <cffunction name="dump" access="private" returntype="void" hint="dump wrapper">
        <cfargument name="stuffToDump" type="any" required="true" hint="what you want to dump">
        <cfargument name="abort" type="any" default="false" hint="abort after dump">
        <cfargument name="expand" type="any" default="false" hint="expand output">
        <cfdump var="#arguments.stuffToDump#" expand="#arguments.expand#">
        <cfif #arguments.abort# EQ 1>
            <cfabort>
        </cfif>
    </cffunction>
    

    There are probably better ways around this problem, but this is what I currently use.

    You can put it (temporarily) on the cfc file that you are currently working on, but obviously don’t commit this to your code base as you don’t want the dump function on all your files.

    Or you could put it permanently onto a cfinclude file, and just include that (again – temporarily) to files you are debugging.

    Another alternative I guess is to put it onto the Application.cfc. This file has a number of standard methods but you can also define your own additional methods to be included into it. Then you have your dump() function available in the APPLICATION scope.

    There’s a good info page on the Application.cfc file here. http://www.bennadel.com/blog/726-ColdFusion-Application-cfc-Tutorial-And-Application-cfc-Reference.htm

    I have even seen it used in the Server scope, but this should never be done on production code. OK for debugging I guess as a last resort, just make sure you remember to remove it.

    Personally I think both these options are probably far from ideal, and it’s a great shame it took Adobe so long to provide a script alternative to the function. Would have saved a lot of pain.

    But hopefully if you are using CF9 then all this will be irrelevent to you and you can just use the new writedump() function now they have finally added it in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Objective C for Windows iPhone development on Windows Is there any way
Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: Opening url in new tab while i am doing window.open(), my page
Possible Duplicate: .NET - What’s the best way to implement a catch all exceptions
Possible Duplicate: JavaScript: var functionName = function() {} vs function functionName() {} What's the
Possible Duplicate: Matlab gives wrong answer Can anyone explain to me why the following
Possible Duplicate: What is the most efficient way to clone a JavaScript object? (Most
Possible Duplicate: PHP get all arguments as array? Within a javascript function arguments always
Possible Duplicate: How to call a JavaScript function from PHP? I have a php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.