Troubleshooting ColdFire

A few people have reported that they are unable to see debugging in the ColdFire Firebug panel. I've been unable to reproduce these issues so I thought I put together a quick post on how ColdFire works in hopes that it may help people debug their issues.

ColdFire works using custom HTTP request and response headers. You can inspect these custom headers using the Net tab of the Firebug extension.

The Request

ColdFire debugging really begins with the request. If Firebug is enabled for the site then the ColdFire appends "ColdFire/xxx" to the User-Agent request header before the request is sent to the server.

The coldfire.cfm template then checks the User-Agent request header to ensure it has the appropriate "ColdFire/xxx" string before doing any processing. If you take a look at the coldfire.cfm you will see that the User-Agent header is not the only condition that must be met in order for ColdFire to process.

<cfif IsDebugMode()
and StructKeyExists(GetHttpRequestData().headers,"User-Agent")
and FindNoCase("ColdFire/1.001",GetHttpRequestData().headers["User-Agent"]) gt 0
and not GetPageContext().GetResponse().containsHeader("location")>

<!--- Build Headers --->
<cfset coldfire_udf_main(debugMode=false,maxHeader=8000)>


First we check to see that debugging has been enabled in the ColdFusion administrator via the IsDebugMode function. Then we check to see if we have a User-Agent header and if so, that it is set to the correct ColdFire version. Finally we check to see that <cflocation> has not been used in this request. If all those conditions are met ColdFire then goes about adding custom headers to the response.

The Response

The coldfire.cfm passes debugging info back to the ColdFire extension via several custom headers:

With the exception of x-coldfire-general the headers may have 1 to n headers based on how much data we are sending back to the user. For example, if you have a lot of queries on a page you may have several x-coldfire-queries headers, each numbered sequentially like so: x-coldfire-queries-1, x-coldfire-queries-2, x-coldfire-queries-3, etc. The ColdFire extension then parses the JSON encoded data in these headers and displays it in the ColdFusion Firebug panel.

Things To Check If You Are Having Issues With ColdFire

If you are not seeing debugging info in the Firebug ColdFusion panel I would first check to see if debugging works using the classic.cfm debugging template. If it does I would next check the following:

  1. Check that Firebug is enabled for the site you are trying to debug.
  2. Under Debug Output Settings in the ColdFusion administrator:
    • Ensure Enable Request Debugging Output is checked
    • Ensure coldfire.cfm is selected for Debugging Output Format
    • Ensure Report Execution Times is checked
    • Ensure General Debug Information is checked
    • Ensure Database Activity is checked
    • Ensure Exception Information is checked
    • Ensure Tracing Information is checked
    • Ensure Timer Information is checked
  3. Check that your IP address is listed under under Debugging IP Addresses in the ColdFusion administrator.
  4. Check that you are not using <cflocation> or <cfflush> on the page you are trying to debug.
  5. Check that you are not using <cfsetting showdebugoutput="false"> on the page you are trying to debug.
  6. Check that User-Agent header is being set. You can do this using the Net tab in Firebug.
  7. Check that x-coldfire headers are being returned, again using the Firebug Net tab.

Update: ColdFire also requires that Firebug's Net panel be enabled.

Depending on what headers are set you can determine where the issue is. If the User-Agent header is not being set then the issue has something to do with Firebug or the ColdFire extension. If the User-Agent reqeust header is set but there are not x-coldfire response headers then the issue has something to do with ColdFusion or the coldfire.cfm template. Finally if you see x-coldfire response headers in Firebug's Net panel but nothing in the ColdFusion panel, then something has gone wrong with the ColdFire extension.

If you think the issue is with the coldfire.cfm you can use standard ColdFusion debugging techniques such as placing strategic <cfabort> calls to determine what is causing the problem. If the problem is thought to be with the ColdFire extension you may try looking at Firefox's Error Console to see if any errors are being thrown. (Note that in the current version there are several messages logged to the console by the ColdFire Service. These are not errors and this debugging output will be removed in the next release.)

I hope this post helps those of you having issues with ColdFire figure out what is going on. ColdFire is still a work in progress so keep the bug reports and feature requests coming!

Jamie Krug's Gravatar First, thanks a bunch for your work on ColdFire and for taking the time to put together this troubleshooting information.

I was having trouble getting ColdFire working -- basically, I wasn't even seeing the "ColdFire" tab in Firebug.

After spending nearly an hour trying to get ColdFire working on my laptop, including carefully reading this page and checking each item on your "Things To Check If You Are Having Issues With ColdFire" list, I was able to itentify my problem as one having to do with the extension installation itself. I followed the simple instructions and clicked File > Open File and then selected the "coldfire_v1.001.xpi" file but it didn't seem to be installing anything, nor does it ask me to restart Firefox. I simply see the following in my browser window when I open the "coldfire_v1.001.xpi" file:

"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071008 Firefox/"

I repeatedly closed all Firefox windows and repeated this process, but always saw the same thing. So rather than researching ColdFire installation problems, I researched Firefox extension installation problems (i.e., Google'd "Firefox unable to open xpi file"). The problem was very simple to resolve, but took quite a while, so I'd like to suggest that you add this change to your installation docs...

I found my answer at and I knew it was going to work when I read this:

"Some web sites offer the option to download a theme or extension instead of installing it. The downloaded file will have a ".jar" or ".xpi" extension. Do not try to open these files directly. After the download is complete, drag the downloaded .jar or .xpi file icon from the desktop (or other location) and drop it onto an open Firefox "Add-ons" window ("Extensions" or "Themes" window in Firefox 1.5 and earlier)."

So, I'd propose that you make this simple installation doc change...

To install the ColdFire extension, go to the File/Open dialog in Firefox. Select the coldfire.xpi and open it. Again - be sure to restart Firefox when asked.

To install the ColdFire extension, drag the downloaded coldfire.xpi file and drop it onto an open Firefox "Add-ons" window ("Extensions" or "Themes" window in Firefox 1.5 and earlier). You can open an add-ons window by clicking Tools/Add-ons.

Thanks again!
# Posted By Jamie Krug | 10/25/07 6:14 PM
Jamie Krug's Gravatar First, thanks a bunch for taking the time to put together this useful information!

If anyone is having trouble simply getting the ColdFire extension to install properly in Firefox by following the installation documents, you may need to drag/drop the .xpi file onto an add-ons window (Tools/Add-ons) rather than opening it directly. I've outlined more details of my struggle at where I've also suggested making this minor change to the ColdFire installation documents.

# Posted By Jamie Krug | 10/26/07 9:35 AM
Marcel's Gravatar Not sure if this is a solution for everyone, but I managed to get it working by first deleting the cfif that is commented as "- Check that ColdFire is enabled -" in the coldfire.cfm, which means it will execute the <cfset coldfire_udf_main(debugMode=false,maxHeader=8000)>

After that it started working and even when I put back the cfif!

I'm already a big fan of this new tool!
# Posted By Marcel | 1/14/08 5:01 AM
jeff c's Gravatar Aaarrrggggg....foiled by a renegade cfflush! Thanks for the tips all.
# Posted By jeff c | 10/22/09 1:17 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.