简体   繁体   English

在Eclipse中运行和调试节点项目

[英]Running and debugging node project in Eclipse

I want to run a node.js project locally and create a debugging session. 我想在本地运行一个node.js项目并创建一个调试会话。 Normally, this would be accomplished by running "debug as" a node project in Eclipse. 通常,这可以通过在Eclipse中运行“调试为”节点项目来完成。 However, when I run the debugging session, nothing seems to run locally. 但是,当我运行调试会话时,似乎没有任何本地运行。 In other words, when I open a browser and point to localhost, nothing is running. 换句话说,当我打开浏览器并指向localhost时,没有任何运行。

It says the "debugger listening on port 5858", but my application doesn't appear to be running via any port. 它说“侦听器侦听端口5858”,但是我的应用程序似乎没有通过任何端口运行。

在此处输入图片说明

and when I try to debug it using the V8 debugger I get this error: 当我尝试使用V8调试器对其进行调试时,出现此错误:

在此处输入图片说明

I'm no node expert, but i guess the following will solve your problem: You have to start two programs in debug mode. 我不是节点专家,但是我想以下可以解决您的问题:您必须在调试模式下启动两个程序。 Besides your remote debug start configuration, you also have to start a server in debug mode first. 除了远程调试启动配置外,还必须首先以调试模式启动服务器。 Your remote debug mode will then connect to it, when started. 启动后,您的远程调试模式将连接到它。

Nodeclipse sometimes has issue #72 when launching Node app. 启动Node应用程序时,Nodeclipse有时会出现问题72。 (Exact reason is not clear as it is hard to reproduce once it is fixed. This is Java version related issue) (确切原因尚不清楚,因为一旦修复就很难重现。这是与Java版本有关的问题)

See toggleBreakpointsTargetFactory specified id is already registered , and node.js express app won't start (or debug) in Eclipse (Nodeclipse) 请参阅toggleBreakpointsTargetFactory指定的ID已被注册 ,并且node.js express应用程序将无法在Eclipse中启动(或调试)(Nodeclipse)

Create issue on GitHub with exact environment specification. 使用确切的环境规范在GitHub上创建问题。

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

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