Got the FireBug

I spent part of my weekend doing a bit more work on my super-semi-secret Rails CMS, especially on part of the admin area that involved some nice AJAX effects that of course caused more trouble than is immediately worth it. One of the main problems is that it’s very awkward to debug AJAX code without writing in code to display errors, etc. in the interface which you might not want to do.

In trying to learn a bit more about Rails’ RJS templates for my AJAXing, I bought the O’Reilly PDF book on the subject (along with a couple of others on web services and SEO - 3 for 2 offers are sometimes hard to pass on). One of the most useful tips it contains is a link to FireBug, a JavaScript plugin for Firefox that among other things allows you to track AJAX requests. Just go to its console, options and enable XMLHTTPRequests tracking and you can see exactly what’s being sent via AJAX and what comes back.

I’ll separate my JavaScript woes into another post so you can just take this one as a recommendation to check out FireBug.

One Response to “Got the FireBug”

  1. supersonic feet » Blog Archive Says:

    […] My previous post mentioned FireBug and how handy it is in tracking/debugging AJAX requests and code. This was particularly important as the problem I’m having is with Sortable lists (in tree form) and child elements not being serialized when they’re added via AJAX. To explain a bit further, I’m using the technique to list the pages of a site, with sub-levels loaded in via AJAX so that you don’t get loaded with a few hundred pages listed all at once when you only want to get to the home page. That bit’s fine though - works perfectly. The problem is with the sortable part - here I’ve had no end of troubles. […]

Leave a Reply