“Dumping” Expressions

I showed you a tag named <cfdump> in Listing 8.9. This tag is never used in live applications, but it’s an invaluable testing and debugging tool. <cfdump> lets you display any expression in a cleanly formatted table. You saw an example of dumping an array previously; now let’s try another example. Type the following code into a new document (see Listing 8.11), save it as cfdump1.cfm, and then execute it in your browser. The output is shown in Figure 8.15.

Figure 8.15. <cfdump> is an invaluable diagnostics and debugging tool capable of displaying all sorts of data in a clean and easy-to-read format.
Listing 8.11. cfdump1.cfm
<html> <head> <title>&lt;cfdump&gt; Example 1</title> </head> <body> <cfset ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.