This post talks about how hard it is to debug JavaScript.

In general, pushing the UI to Javascript makes it hard to develop and debug. There are limited tools, the language is too lenient (no objects, weak typing), and testing involves cycling through webpages over and over again.

Obviously, this statement is false: there are objects in JavaScript and some nice features… JavaScript is not too lenient: there are many solid languages without strong typing and they work just fine. But I must say that, indeed, it is quite hard to debug JavaScript. Incredibly so.

My friend Scott Flinn would say “it’s the browser, stupid”… since he thinks that JavaScript is fine, but that JavaScript in the browser is bad.

That’s why, if I ever attempt to do no trivial JavaScript, I will try to use command line interpreter. The command line is a powerful programming tool despite what Microsoft and Borland think.

5 Comments

  1. have you tried venkman for debugging javascript ? it is really quite good

    Comment by Lokey — 14/1/2005 @ 21:46

  2. Yes. I find it so so. It is not a real command line for one thing.

    Comment by Daniel Lemire — 14/1/2005 @ 22:03

  3. The netscape/mozilla javascript debugger also works quite nicely. If you have not tried it just type “:javascript” in a gecko based browser like firefox.

    Comment by Keith — 4/5/2005 @ 11:03

  4. I think venkman is the netscape/mozilla javascript debugger. It is nice to see the errors listed properly, but it is rather primitive because I cannot easily manipulate the data and the code. I cannot easily see what is in the objects and so on.

    Comment by Daniel Lemire — 4/5/2005 @ 11:21

  5. Look at this IE Javascript debugger! It’s great!
    And it comes free with MS Office… or Frontpage.

    http://www.mandala.com/javascript/debug_javascript.html

    Jeff-

    Comment by Jeff Papineau — 29/6/2005 @ 21:01

Sorry, the comment form is closed at this time.

« Blog's main page

Powered by WordPress