Discuss: Advanced Debugging With JavaScript
by Hallvord R.M. Steen , Chris Mills
- Editorial Comments
2 Untitled
Let me second how much great the Visual Web Developer Express Edition is. Especially when you when compare it to the JavaScript debugging in the Microsoft Script Debugger. Only probably I have with it is too much debugging causes it to take up a lot of memory, which hurts when working in a VM. But restarting the web developer frees everything up and you can restart.
That being said, I have found recent version of Firebug to be going down hill. To save on HTTP requests I have something that combines all my scripts into a large single file which regularly results in Firebug complaining about scripts taking too long to execute as it tries to step from one line of code to the next while debugging. And lately I have seen it just ignore changing the arrow when it steps through so one doesn’t know where you are at that point. Additionally, doing too much work with Firebug eventually causes page refreshes to prevent JavaScript from running at all and at best the tab to be duplicated to continue working, or at worst Firefox needs to be restarted completely.
posted at 02:28 pm on February 3, 2009 by Brian LePore
3 Problems with FireBug
I have to say that FireBug used to be great, but lately I’ve noticed that a clear error will not show up in the debugger once in a while. I use JQuery, and FF3.
posted at 04:59 pm on February 3, 2009 by Jupiter Florida
4 Debugging in other browsers
a) If you also want to use Firebug in other browsers, give Firebug Lite a try. It doesn’t inherit the nice pull-up window like the full-blown FF extension, but it’s still useful to avoid having to switch all the time between different debugging systems.
b) There’s yet another nice solution for IE called DebugBar . It features all the niceties Firebug has built in, including Firebug extensions ;)
BTW: At the same site there’s also available an Internet Explorer 6 – 8 emulator add-on – very useful if you dont want to through the complicated setup of several IE versions and/or virtual machines.
cu, w0lf.
posted at 06:04 pm on February 3, 2009 by Fabian Wolf
5 behavior driven
you guys missed out on some great tools like screw-unit to support writing specs (design your code) before executing:
http://github.com/nathansobo/screw-unit/tree/master
Of course you could write the specs after the fact…
posted at 10:16 pm on February 3, 2009 by gustin prudner
6 Safari Debugger
The debugger in Safari’s nightly builds has been given an overhaul some time ago.
Webkit site
posted at 09:52 am on February 4, 2009 by Namdnal Siroj
7
Thanks a lot for the discussion so far folks!
1. I agree about needing debugging after IE 8, especially for older IE scripting engines…but it is heavy on the VM! Not sure what to suggest really. The IE 6-8 emulator someone mentioned above sounds very interesting and worth a try.
2. Firebug – I know they are doing a lot of improvement work on it right now…possibly because of all the work we are doing on Opera Dragonfly…lol ;-)
3. Screw-unit – thanks for the tip
4. Webkit debugger – it’s good to see this being improved upon as well.
posted at 02:16 pm on February 4, 2009 by Chris Mills
8 Thanks from the techies!
It’s nice to see a hard-core technical article like this. It seems ALA is moving its content more towards web designers than developers over the last few years, but it’s articles like this keep me here.
posted at 02:52 pm on February 4, 2009 by Michael Newton
9 Agreed
I agree; its actually refreshing to see an article here that isn’t a polemic or a “my job is SO important, but my job title is wrong; woe is me” article.
Its also worth noting how far JS has come since 2000; back then it was pure HELL to code in JS, now we have sensible debugging, and worthwhile frameworks.
If only its default response to an error wasn’t to lock up silently…
posted at 07:55 am on February 5, 2009 by Richard Cotton
10 Possible Error
The example code doesn’t seem in sync with the article. I particular in the “Bug two” section the init() function does not include the line “lang = getLanguage();”. This is significant as this is the part of the tutorial where we’re supposed to “step into” the getLanguage() function.
posted at 07:57 pm on February 5, 2009 by Dave Lancea
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)




1 IE debuggers
Even after IE8 is available, there will still be a need to debug JavaScript in older browsers. Microsoft offers the free Visual Web Developer Express Edition, which has a very good debugger (once you figure out how to set it up). The following blog has instructions: http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/
posted at 01:41 pm on February 3, 2009 by Patrick Fitzgerald