There are two methods I have found useful in debugging and are listed here in my order of preference:
1. Firebug plugin for Firefox. It allows you to view the DOM and put breakpoints within your class source so you can trace and view values as code gets executed.
2. Under your IE preferences change the advanced settings to allow debugging. Install the free download from MS for Visual Web Developer or Studio. This will allow IE to throw an error and display the source where the error occured. This approach is not very elegant, but is better than the useless messages it shows without it.
Joined: Aug 19, 2008
Hi, But is their IDE which can help to debug Java Scripts , like Java Code ?
the book doesn't go into debugging, but as B Webb says, there's the excellent Firebug extension and also several debuggers for IE by MS. They allow you to set breakpoints, step in, out, etc, everything you could expect from a debugger.
Is there a good IDE with debugging built-in? That I don't know, in the past I've tried some Eclipse plugins, there was a one pretty decent one, there's also Aptana IDE which should be pretty good. Not a big IDE fan myself, I cannot recommend you something specific.