简体   繁体   English

在NetBeans / Eclipse中运行JavaScript文件?

[英]Run JavaScript file in NetBeans/Eclipse?

Is there a way to run a JavaScript file directly in NetBeans or Eclipse? 有没有办法直接在NetBeans或Eclipse中运行JavaScript文件?

I feel it's time consuming to fire up a terminal, browse to that file and run it with node all the time. 我觉得启动终端,浏览到该文件并一直使用节点运行它是耗时的。

另一个带有Node.js项目类型和npm集成的NetBeans Node.js插件(我是它的作者)在NetBeans Tools for Node.js中有所描述。

Yes, you can debug using Rhino in "Run As" without leaving Eclipse: http://wiki.eclipse.org/JSDT/Debug http://www.eclipse.org/webtools/jsdt/debug/ 是的,您可以在“Run As”中使用Rhino进行调试,而无需离开Eclipse: http//wiki.eclipse.org/JSDT/Debug http://www.eclipse.org/webtools/jsdt/debug/

If you'd like to debug it remotely on a Node.js instance, you can use: https://github.com/ry/node/wiki/Using-Eclipse-as-Node-Applications-Debugger 如果您想在Node.js实例上远程调试它,可以使用: https//github.com/ry/node/wiki/Using-Eclipse-as-Node-Applications-Debugger

If you'd like to remote debug a Chrome/Chromium browser: http://code.google.com/p/chromedevtools/wiki/EclipseDebugger 如果您想远程调试Chrome / Chromium浏览器: http//code.google.com/p/chromedevtools/wiki/EclipseDebugger

The latter two options will use V8, which is Google's JS engine behind Chrome, which has also been implemented in Node.js. 后两个选项将使用V8,后者是Chrome后面的谷歌JS引擎,它也已在Node.js中实现。 The first option will use Rhino, which is Mozilla's JS engine. 第一个选项将使用Rhino,这是Mozilla的JS引擎。

是的,您可以使用Node.js插件直接从NetBeans IDE运行JavaScript文件: 从netbeans.org下载NodeJS插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM