DEV Community

James Moberg
James Moberg

Posted on

Javascript version of ColdFusion CFDump

The Dump method is based on one of the tags available in Coldfusion <cfdump> providing the ability to display simple and complex variables in a user friendly way that is perfect for debugging/inspecting data.

Some environments don't allow for CFDump or maybe you want to inspect a javascript object and aren't able to use the browser of your choice. This JavaScript method "Dump()" from 2006 allows you to "CFDump" javascript objects.

Server-Side Example

<cfoutput>
<script>
var t = #serializeJson(server)#;
dump(t);
</script>
</cfoutput>
Enter fullscreen mode Exit fullscreen mode

Source Code

NOTE: This is a 6/21/2013 repost from my Tumblr blog.

Top comments (0)