Question
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.
Answer
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:
- Use logging. Either implement your own logging utilities, or a common one (e.g. https://wiki.mozilla.org/Labs/JS_Modules#Logging although I haven't used that one yet; see also http://developer.mozilla.org/en/docs/Using_JavaScript_code_modules)
- When writing your code, use the JS Shell and the Live XUL Editor (from the Extension developer's extension) along with the DOM inspector for prototyping.
- Set up a profile for development, then debug by tweaking the source code (adding logging and alert()s :) and reloading the affected window.
- When possible, write unit tests using the available frameworks (they're not widely used with code outside the Mozilla tree currently)
Hopefully Komodo (Mozilla-based editor/IDE, went open-source last year) will grow tools for debugging Mozilla code eventually.
< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/4392/" >Best Debugging Tools for JavaScript/xulrunner Development< /a>
0 comments:
Post a Comment