Javascript Debugging in Firefox
So the latest task at the day job is to debug someone elses JavaScript. This system was written in 2000 and there's thousands of lines of the stuff, sniffing for Netscape versions and checking whether IE is above version 4 ( :eek: ).
The Problem
Opera doesn't work with this system (because of authentication with IIS, a completely different story), IE has a good Javascript debugger but the CSS hasn't been hacked to work with it yet (also IE is an awful browser), and Firefox only has this:
This allows us to look at the particular line of code where the issue occurred, but to debug this pile something a little more serious is required: We need breakpoints, watches, the ability to step through code line-by-line and all those other debugger spangly bits!
All yesterday was spent bouncing between IE for debugging, FF for viewing and Opera for looking stuff up on the net. Too many browsers, there must be another way...!
The Solution
But then the solution was in FF all the time... Just not installed, it's called the Javascript debugger (inventive name!), and is accessible through "Tools -> JavaScript Debugger" If you've got it already, then great - ignore me - if you haven't it can be downloaded from:
http://hacksrus.com/~ginda/venkman/
It's known here as "Venkman." Svend Tofte has been good enough to write an article about using it which is available at:
http://www.svendtofte.com/code/learning_venkman/
I won't go into any details about how it works (Svend has written a perfectly good article already), but thought it might be useful for others around here.
Having been through that I felt the urge to write it all down. Am now using FF for debugging and working on this system, Opera for surfing and have happily gone back to pretending IE never existed in the first place.
a Padded Cell our articles site!
JeevesBond posted this at 12:53 — 27th September 2005.
He has: 3,956 posts
Joined: Jun 2002
Oh, and here it is in all it's glory
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.