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

DeprecationWarning: node --inspect --debug-brk is deprecated #32529

Closed
ManfredSteiner opened this issue Aug 15, 2017 · 6 comments
Closed

DeprecationWarning: node --inspect --debug-brk is deprecated #32529

ManfredSteiner opened this issue Aug 15, 2017 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@ManfredSteiner
Copy link

Since VSCode version 1.15.0 F5 (starting debug) prints out the following message:

(node:31245) [DEP0062] DeprecationWarning: `node --inspect --debug-brk` is deprecated. Please use `node --inspect-brk` instead.

Any ideas how to prevent this warning?


Project/System details:

  • VSCode Version: 1.15.0 (8b95971)
  • OS Version: Ubuntu 16.04.3 LTS
  • node Version: v8.3.0

Steps to Reproduce:

  1. see https://github.com/ManfredSteiner/typescript/tree/master/console
  2. start in debugging mode (F5)

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Aug 15, 2017
@weinand
Copy link
Contributor

weinand commented Aug 15, 2017

duplicate of #28223

@weinand weinand closed this as completed Aug 15, 2017
@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 15, 2017
@ManfredSteiner
Copy link
Author

Nice to see that it's closed...
But what's the solution to prevent printing this warning?
Maybe I am blind, but I cannot see any hint in the referenced issue.

@weinand
Copy link
Contributor

weinand commented Aug 15, 2017

Let me try to summarise this for you:

Currently there is no way to prevent this.

The reason why we use the combination of "--inspect --debug-brk" is clearly explained in the (indirectly) linked issue #27731:

This combination of args is the only way to enter debug mode across all node versions. At some point I'll switch to inspect-brk if we don't want to support node 6.x anymore, or will do version detection for it and do something for runtimeExecutable scenarios.

The problem is that we do not really know what version of node a user is using, so we cannot adapt the flags we use to the node version in order to minimize the resulting deprecation warnings.

@ManfredSteiner
Copy link
Author

@weinand, thank you for summarizing. Maybe it is possible to check node version and to use the right combination, or to add an additional config option in launch.json.

fbricon added a commit to redhat-developer/vscode-java that referenced this issue Aug 31, 2017
@nocke
Copy link

nocke commented Oct 27, 2017

As advice to googlers coming here through google on this deprecation warning (this page ranks 1st or 2nd...). This feature now exists!

  1. ensure your Node Version is ≥ 8.0

node --version

  1. change in your launch.json from
< "protocol": "legacy",
> "protocol": "auto",

Problem solved (=feature activated). On your next run...
Debugging with inspector protocol because Node.js v8.4.0 was detected...

@weinand
Copy link
Contributor

weinand commented Oct 27, 2017

Since "protocol": "auto" is the default anyway, there is no need to use an explicit protocol attribute.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants