Very cool trick - CFBuilder extensions and Firebug Lite

While in Europe, I've now given my presentation on CFBuilder and Extensions three times. I'll be giving it a final time in Zurich tonight. One of the things I've mentioned in all the stops is that - much like AJAX - it can sometimes be difficult to debug problems when working with extensions. Last night when I said this, Ben Nadel asked if I thought Firebug Lite would work within the context of CFBuilder. For those who don't know, Firebug Lite is a JavaScript file you can add to a non-Firebug enabled site to get Firebug features. It is not as feature-rich as the "real" Firebug plugin, but it does quite a bit. Turns out he was on to something. Here is how I tested and what I found.

I began by modifying the handler of a very simple extension I built for my presentation. Previously it just checked to see if you had clicked on a file or folder and reported on some user input. My test code was added on top of that.

<!---<script type="text/javascript" src=""></script>---> <script src="http://localhost/firebug-lite.js"></script> <script type="text/javascript" src=""></script> <script> $(document).ready(function() { console.log('loaded') $("#foo").load('http://localhost/test2.cfm') console.log('fired xhr') }) </script> <p id="foo"></p>

You can see I originally used the hosted version of Firebug Lite. It worked - but I noticed a definite pause when I used it. I'm sure that was more my connection than anything else. Nonetheless, I copied it to my local system and used it there instead. Next I included jQuery. I wanted a quick and dirty way to do AJAX and obviously I'm a jQuery fan boy so why not use it. Finally - I wrote a few quick tests. I tried the console and an AJAX request to a local file. The result?

As you can see, the Firebug Lite icon shows up in the lower right corner. I increased the size of the dialog and then clicked it.

Sweet As you can see, I've got both console messages there as well as the XHR request. Clicking to expand the request gives me the data that was returned.

Sweet Again! So I'm not sure how deeply you would want to use AJAX within a CFBuilder extension, but if you do decide to push the limits, this could be a real boon to your development. Thanks again to Ben for the idea, and thanks to Adobe for the extension feature!

Like This?

If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can also subscribe to the email feed to get notified of new posts.