Posted in ColdFusion | Posted on 07-26-2007 | 1,941 views
Today Nathan Mische and I released ColdFire 0.0.802. This update adds basic support for variables. What do I mean by that? ColdFusion's classic debug view lets you turn on various scopes. When you view a page, that entire scope is dumped out. I never cared for that as it typically displayed a lot more information than I needed. While you could get around that by using cftrace, I wanted something a bit better.
ColdFire now supports a Variables tab. You tell ColdFire the variables you want to display and it will then show the values when the page is refreshed. This is the initial release of Variables support and there are a few caveats. First - I only support simple values. It won't be hard to add support for arrays and other complex variables, but I wanted folks to do some quick testing first. Second, you must use full scopes. Don't just type "x", but rather, variables.x. Or url.x. Or form.x. You get the picture. Here is a screen shot:

Also in this fix are updates by Nathan in the XPI to help with memory leaks and other issues as well.
You can download ColdFire at RIAForge: http://coldfire.riaforge.org


Array: ["1","2","etc"]
Struct: [name="1",age="29"]
We _can_ get a bit fancy in our display it a bit closer to cfdump style. We shall see.
Right now I just need folks (like you) to tell me if simple stuff is even working.
<cfdump var="#variables#" label="Variables scope" expand="false">
You know developers... we're lazy. Why bother (essentially) "adding a watch" for a variable (or more often: the 12 I'm interested in,) when I can just dump them all and scan through for the one(s) I want?
Certainly no disrespect intended; just my thoughts. :)
Adam:
1. No one will force anyone else to use this. :)
2. Are you still using OnRequestEnd.cfm ??? Give Application.cfc a try! :) There are different ways to make life easy. If this way doesn't work for you then certainly don't use it. Some people build very rich applications and need to have more responsive debugging information.
@John - I'm not quite sure I get you. I _am_ using JSON behind the scenes. JSON doesn't have anything to do with how the data is _formatted_ though.
[Add Comment] [Subscribe to Comments]