开发者

Getting Eclipse Helios Javascript working

I've just downloaded Eclipse IDE for JavaScript Web Developers and can't figure out how to run or debug a standalone javascript program using it. Presumably I have to set up a server of some k开发者_运维问答ind? Any idea where the documenation might be?


There are a few javascript debugger plugins for Eclipse, but I don't think that's generally what people use.

Generally (since the javascript is running in the browser, and each browser behaves differently), you'll run and debug in the browser.

For javascript debugging, I use:

  • Firefox: Firebug
  • IE8: built-in developer tools (F12)
  • Safari: built-in developer tools (enable the menu in prefs, then enable the JS debugger)
  • Google Chrome: based on webkit, the JS debugger is nearly identical to Safari's

On the eclipse side, it really depends on what you're writing. If you're just making a web page with some contained javascript, perhaps eclipse isn't the right tool for you. It'll work, but it's probably overkill. I'd suggest something like Dreamweaver, or some other website authoring program.

Generally Eclipse is used for building compiled applications (Java web apps, Java standalone apps, etc, etc).

I use Eclipse for javascript every day, but it's in the scope of building a Java web application. I use the "Eclipse IDE for Java EE Developers" build. This contains the WTP tools, which has Javascript support. It also includes support for debugging java code in your tomcat or other servlet container (and deploying all your javascript, html, jsp, etc to your application server).


I found this the other day which I found helpful to get the debugger going:

http://code.google.com/p/jsdt/wiki/HowToStart


The documentation for the JSDT is available at http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.wst.jsdt.doc/started/overview.html

I found this link and some additional resources at http://kellicker.wordpress.com/2010/08/17/jsdt-resources/

If your stand-alone script is intended to be processed by web browsers, your best bet is to use Google's JsTestDriver. It will allow to have your code executed in different browsrers, and, at the same time, launch the execution of tests and and get its results report from within Eclipse.

Disclaimer: I'm new to JSDT and JsTestDriver, and my attempts to use the JsTestDriver Eclipse plugin have been failing all this morning...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜