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.