Terminal/Console version of cfdump?

Anyone know of a tag (or function) that they have created that means I can do dump() or <cfdump> to appear nicely in the console/terminal?

Mark Drew

I thought cfdump would output to the console?

Andrew Penhorwood

<cfdump format="text" ... > ?

Ohh! I didn’t know about that!

Alas it is … ok… but not designed for the terminal

pluto:bin markdrew$ box repl
Enter any valid CFML code in the following prompt in order to evaluate it and print out any results (if any)
Type 'quit' or 'q' to exit!
CFSCRIPT-REPL: dump(var="#{hello:"bob"}#", format="text");
<pre>Struct

HELLO 
    string bob </pre>

CFSCRIPT-REPL: 

But if I do something bigger:

CFSCRIPT-REPL: dump(var="#SERVER#", format="text");
<pre>Scope

coldfusion Struct

    appserver 
        string 
    expiration 
        Date Time (Europe/London) 
        {ts '2037-12-31 23:00:00'} 
    installkit 
        string 
    productlevel 
        string os 
    productname 
        string Lucee 
    productversion 
        string 10,0,0,0 
    rootdir 
        string / 
    serialnumber 
        string 0 
    supportedlocales 

A table would be nice you know? I know I am being fussy and I should just damn well write it :slight_smile:

MD

Hi Mark,

I am not sure if your question has the emphasis on “appear” or “nicely”, but to make it appear in the terminal, just do

<cfdump var="123" output="console" />

Kind regards,

Paul Klinkenberg

1 Like

when i first read that, i thought you meant the browser console, which would be feasible given the new cfdump implementation uses json?

Can you edit your post so we can see the code… you leave me in suspense! :stuck_out_tongue: