views:

2001

answers:

11

In the past few months I began my first serious JavaScript development, as I began developing XUL applications. I use Notepad++ as my editor, but I was pretty appalled to find (as far as I can tell) that Venkman/Javascript Debugger is the tool for debugging. It seems like a poor replacement to Visual Studio for .Net languages.

Am I missing something? What are the best tools and best practices for JavaScript development? Is there some killer IDE/debugger/editor combination I'm not aware of?

It has to be easier than this, though.

I've heard some mention of Eclipse - is it a good choice here? I know very little about it.

Edit: Some of you have pointed out Firebug - I guess my problem was that I'm not actually using JavaScript for web development for which Firebug seems to be the tool -- instead I'm using it for XUL development in xulrunner. Which may simply be a weakness or immaturity of xulrunner.

+2  A: 

Firebug is pretty well unbeatable for JavaScript development in a browser.

Dave Ward
Except by Dragonfly, check it out, if you can find it.
PintSizedCat
A: 

'alert(x);' was the primary technique for too long.

FireBug, as others have said, is the way to go in FireFox debugging.

the Aptana IDE (based on eclipse) made a bit of a splash in the javascript IDE region recently.

Visual Studio 2008 contains much improved javascript debugging capabilities over the previous versions.

Leon Bambrick
A: 

Try a combination of Script# (http://www.nikhilk.net/ScriptSharpIntro.aspx)

and

Firebug (http://getfirebug.com/)

Cheers

1:

I can't edit the post, but the links are a little messed up.
Joel Anair
A: 

The nightly builds of WebKit have some great new debugging tools:

http://nightly.webkit.org/

tlrobinson
He is developing xulrunner applications, where you program a "native" looking UI in JavaScript. It's what Firefox is written in, but basically, you can't use a debugging tool for WebKit to debug JavaScript in xulrunner.
Douglas
+7  A: 

Yeah, there's no decent debugger for XUL+JS development currently. But in my several-year experience I could do well without it. Here's how:

Hopefully Komodo (Mozilla-based editor/IDE, went open-source last year) will grow tools for debugging Mozilla code eventually.

Nickolay

Nickolay
A: 

@Nickolay, thanks for the good word on XUL development.

pc1oad1etter
A: 

I did a Google search for (Xul IDE) and the first hit was a listing on the Mozilla wiki of different XUL IDE.s I also found an app called XULU studio in the results.

https://wiki.mozilla.org/XUL:IDE

ScottKoon
A: 

I do a lot of XUL/JS development, and I use a combination of Eclipse and JSEclipse for code editing and Venkman for debugging. It can be tricky to get Venkman working with your XUL app, but it's worth the effort.

http://developer.mozilla.org/en/Debugging_a_XULRunner_Application has the information on enabling Venkman in your app. Check it out; I assure you it's worth the time you spend on it.

Joel Anair
I do have Venkman working, it's just less convenient than if it could be integrated with the IDE. I would be interested to hear more about how you are using eclipse, and if this works: http://eclipsexul.sourceforge.net/
pc1oad1etter
A: 

If your using SQLite at all, especially for FireFox development then i would suggest the Firefox Addon "SQLite Manager". Not only does it easily enable you to see profile informations stored by Firefox in user profiles but you can also open up other SQLite databases. Very useful.

Toby Mills
A: 

As I said in another post, to me the most convenient debugging tool for JavaScript is Mozrepl. It is a Firefox/XULRunner extension that accesses the browser/application instance using telnet, and you can observe and manipulate everything in your application remotely; even the framework itself.

It is incredibly useful as a debugger (on standalone XUL applications it is the only bearable way to do real debugging) and as a tool to play around and understand the guts of your application, it speeds up your XUL Javascript development time tenfold.

For an impressive demo of is possibilities, check out this video.

Sergi
A: 

Debug and Profile JavaScripts – JavaScript debugger and profile tool. http://www.globinch.com/2010/05/04/debug-and-profile-javascripts-using-venkman-javascript-debugger-and-profile-tool/

Globinch