Duncan's blog

September 16, 2010

cfdump label attribute

Filed under: Coldfusion — duncan @ 9:06 pm
Tags: , ,

The <cfdump> tag in ColdFusion has an optional label attribute which doesn’t seem to be commonly used. Sometimes if you’re dumping out several items at the same time, and potentially from separate files, it can be handy to identify the source of each one.

However I just noticed that the label seems to get applied to all complex data structures within the dumped variable. For example this code:

<cfset a.b.x = {a='one', b='two', c='three'}>
<cfset a.b.y = [1,2,3]>
<cfset a.b.z = 7>
<cfdump var="#a#" label="my struct">

Produces this output:

No big deal, just something I’d noticed. I guess ColdFusion recursively applies the label to all structures as it dumps them out.



  1. Another very cool cfdump feature people miss is the TOP attribute.

    Comment by Raymond Camden — September 16, 2010 @ 9:13 pm | Reply

  2. oh that is cool, wasn’t even aware of it!

    Comment by duncan — September 16, 2010 @ 9:17 pm | Reply

  3. Great information 🙂

    Comment by Cherise Addy — May 16, 2012 @ 5:35 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: