Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs 8 (node:4376) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. #220

Open
paulvi opened this issue Jan 11, 2018 · 15 comments

Comments

@paulvi
Copy link
Member

paulvi commented Jan 11, 2018

Initially raised as Nodeclipse/www.nodeclipse.org#77

It seems that Nodejs 8 change option names

(node:4376) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead.

The line in question is https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java#L114

cmdLine.add("--debug"+brk+"="+nodeDebugPort);

i.e. using --debug is hard-coded now

TODO test with Node.js 8, if using --inspect would work.

HELP WANTED!!

@paulvi paulvi changed the title Nodejs 8 (node:4376) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Was: - Cannot debug JavaScript via Node.JS (Failed to connect to Standalone V8 VM)- Cannot debug JavaScript via Node.JS (Failed to connect to Standalone V8 VM) Nodejs 8 (node:4376) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Was: Cannot debug JavaScript via Node.JS (Failed to connect to Standalone V8 VM)- Cannot debug JavaScript via Node.JS (Failed to connect to Standalone V8 VM) Jan 11, 2018
paulvi pushed a commit to Nodeclipse/www.nodeclipse.org that referenced this issue Jan 11, 2018
@dmidge8
Copy link

dmidge8 commented May 18, 2018

I still have the same issue, that I found through issue #107 .
"Nodeclipse/chromedevtools failed to connect to Standalone V8 VM ( Check Help (F1) and Support http://www.nodeclipse.org/#support )
. Info:
Connexion refusée (Connection refused)"

I am using nodeclipse 1.0.2, which seems to be the latest version. Is the fix included in this version?

@1fifoto
Copy link

1fifoto commented Jun 26, 2018

I could really use this. Is there anything I can do to help?

@paulvi
Copy link
Member Author

paulvi commented Jul 2, 2018

yes, change https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java#L114

build, try that everything works fine

then I will release or help to release

@paulvi paulvi changed the title Nodejs 8 (node:4376) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Was: Cannot debug JavaScript via Node.JS (Failed to connect to Standalone V8 VM)- Cannot debug JavaScript via Node.JS (Failed to connect to Standalone V8 VM) Nodejs 8 (node:4376) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead. Jul 2, 2018
@paulvi
Copy link
Member Author

paulvi commented Jul 2, 2018

Also need to know at what Node.js version this option where renamed,
and do logic to support newer and older versions

@tyllastarr
Copy link

I am having the issue with Node.js v8.11.3. Haven't tested with Node.js 10 yet, but I plan to later.

@Fr33dan
Copy link

Fr33dan commented Aug 13, 2018

Unfortunately it's not a renamed option but a completely new replacement. According to the Node.js V6 change log the --inspect option was added in 6.3.0 to use the "inspector protocol" as an experimental feature which is different than the debugger protocol. Then the V8 changelog says:

  • The --debug command-line argument has been deprecated. Note that
    using --debug will enable the new Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [010f864426]
    #12949.

So the issue is not that the the VM failed to launch because of the changed option, but that the debugger can't connect to the VM because the protocol has changed.

I did go ahead and changing the option in LaunchConfigurationDelegate.java which made the depreciation warning go away, but it still thinks the VM failed to launch.

@gregfenton
Copy link

So I'm guessing the continuation of this issue when running Node-v10.15.2 is expected, yet not desired?
Windows 10, Node-v10, Nodeclipse Enide/Nodeclipse 1.0.2.201509250223.

Is the only solution to downgrade Node.JS to pre-V8?

@paulvi
Copy link
Member Author

paulvi commented Mar 5, 2019

I am not using Node for few years, so don't have real reason to follow node version changes.

Some one should step in, willing to solve the issue with Java code.
I am gonna help to answer any question on how to release.

HELP WANTED.

@david-loran
Copy link

paulvi, it's been many years since I did Eclipse plugin development, so I'm not sure I can help. But isn't it just a matter of changing the nodeclipse plugin's launch configuration of the Node app (e.g., /usr/local/bin/node) to use --inspect or --inspect-brk instead of the deprecated --debug or --debug-brk parameter?

@david-loran
Copy link

Sorry, just seeing Fr33dan's comment re. change in protocol above.

@paulvi
Copy link
Member Author

paulvi commented Mar 11, 2019

Mostly time is need for testing this change,
then doing release.

I can help with the last.

I don't expect someone is going to take over this project. Otherwise I would explain and help to do release by other person.

@Derek-Ashmore
Copy link

Over a year and still no progress on this issue -- Wow!

@paulvi
Copy link
Member Author

paulvi commented May 27, 2019

It will not be, until someone steps in to actually do it.

I am not using Node.js any more, so not going to follow what changes with every version of Node

@mrk1989
Copy link

mrk1989 commented Apr 1, 2021

Please fix this command for replace --debug to --inspect.

The comment #220 (comment) is correct!

C:\Users\muletto10>npm -v
6.14.11

C:\Users\muletto10>node -v
v14.16.0

C:\Users\muletto10>java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) Client VM (build 25.251-b08, mixed mode)

C:\Users\muletto10>node.exe --inspect-brk=1337 C:/Users/muletto10/eclipse-workspace-VA/first/hello-world-server.js
Debugger listening on ws://127.0.0.1:1337/fe46b94c-fe96-47c5-8c2e-3df106065b48
For help, see: https://nodejs.org/en/docs/inspector
^C

@mrk1989
Copy link

mrk1989 commented Apr 1, 2021

Well , if I do "run Node Program" it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants