Eclipse + Node.js during debugging: "Failed to connect to standalone V8 VM connect timed out"

Here is how I did it:

https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger

but in the image after "Now start a new debugging configuration by clicking the Create button:"

my image is different.

However, when I start debugging, I get the error message "Failed to connect to a stand-alone standalone V8-connected virtual machine"

In the debug configuration, I never set the main file to run when the server starts. so something must be missing ...

I have one more small question ...

when I run the code "node --debug dbgtest.js" it works ... what am I doing wrong?

thank you very much

+4
source share
2 answers

You are not doing anything wrong. Of course, the debugger will not be able to connect unless you use your node --debug dbgtest.js , which by default corresponds to port 5858. It simply cannot connect.

You can specify different ports: node --debug[=port] dbgtest.js , as this also says at the beginning of the wiki link.

+5
source

This is a problem with recent versions of node incompatible with the Eclipse JDST debugger node.js.

I get the same error in Eclipse when using node 8.9.4. Tried a lot of things in Eclipse, nothing worked.

So, I tried node.js release from the middle of 2016, version 4.8.7. This was released around the time the Eclipse JSDT / node integration was announced ( http://www.eclipse.org/community/eclipse_newsletter/2016/may/article3.php ). This version of node.js works great with the latest releases of Eclipse.

Perhaps something insignificant that interferes. The latest version displays the message: "Invalid values: node --debug and node --debug-brk are invalid. Use node --inspect or node --inspect-brk ." This is given as a warning, but perhaps this is the main problem, maybe node.js refuses when viewing --debug. Unfortunately, I do not see how this could be changed in Eclipse without changing the code.

The latest version of node that works is version 7. Starting with 8.0.0, it does not work.

+1
source

Source: https://habr.com/ru/post/1387724/


All Articles