Firefox Javascript Debugging

Bug

I’ve got the week off for Thanksgiving, so I had a chance to get back to coding searchmash. I was planning on tackling the back button support, but ended up spending the day on a perplexing Firefox issue.

One great thing about debugging Safari is being able to output text to the console using “window.console.log()”. It’s not as good as MS’s free script debugger, but it’s a lot better than using alert()’s.

I eventually found a way, but it was not well documented, so here’s a quick walk-through:

  • Type about:config in Firefox’s address bar.
  • You should now see a list of names and values in the main window.
  • Right-click anywhere in the window, and chose New->Boolean from the menu.
  • In the box that comes up, put in browser.dom.window.dump.enabled
  • In the next box, chose true

You can now call window.dump(), and the string you pass in will appear in the system console. On the Mac, this is visible in the /Applications/Utilities/Console.app program.

A wrench in the works!

Tirewrench

As I was driving to the monthly Trails Council board meeting on Thursday, I suddenly heard a massive racket coming from the back of my car. I pulled over to the side, and discovered that a wrench had somehow impaled itself on my rear passenger tire!

I have no idea how that happened, I was going around 40 mph on a busy road, so my only theory is that it was bouncing around on the road and somehow it flipped up just when I hit it.

Luckily I didn’t lose control, and just had to get a new tire. The folks at Discount Tire Centers were highly amused by the sight, and lived up to their name with a good price and friendly service.