was introduced to ColdFusion in version 5, but apparently there are many CFers who have yet to discover this invaluable tag. In the past week I received three different code help e-mail requests, all of which I answered with suggestions, all of which included the use of in test code, and all of which were met with responses to the effect of "huh, I've never used before.
So, is an all-purpose data display tool. Give it a simple variable and it'll display it. But can do more than just display simple variables, it can render entire queries, arrays, structures, XML document objects, instantiated ColdFusion Components, Java objects, and any combination of the above (an array of structures containing an array of queries, for example). You can even entire scopes (like SESSION, or VARIABLES) because those are actually structures.
In other words, can display most of what standard debug output can, and a whole lot more too. In fact, come to think of it, I have not used standard debug output in a long time, nowadays I rely mostly on .
If you have yet to use this remarkable tag, do so, quickly. But one point to keep in mind, expects expressions, not names of variables. So, if you the word VARIABLES will be displayed, to dump all variables you'd need .
[cfdump label="session scope before call to foo()" var="#session#"]
[cfset foo()]
[cfdump label="session scope after call to foo()" var="#session#"]
Most pages I work with I have a white background, and I can never see the object type unless I highlight the the page's text. I've heard about ways to make it change, but its my understanding that they entail making changes that aren't allowed under the CF license.
a tool you can customize to suit your needs is a much better tool.
http://www.camdenfamily.com/morpheus/blog/index.cf...
It allows you to dump an array or query and display only the top N items. You can also filter by columns or struct keys.
Do you remember that in the CF 5 the cfdump tag doesn't works with the scope variables?
I remember that I had to make some modifications to dump my crated variables because it doesn't work.
Was it a bug?
Regards,
Marcos Placoná
The tag would be easy to fix...if it weren't encrypted. I guess MM changed their mind, since an earlier blog entry indicated they were not.