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

use '--inspect-brk' instead of '--debug-brk' when connecting to node v8 #27731

Closed
weinand opened this issue May 31, 2017 · 6 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded

Comments

@weinand
Copy link
Contributor

weinand commented May 31, 2017

2017-05-31_14-14-24

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label May 31, 2017
@roblourens
Copy link
Member

#27597 for now.

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.

@roblourens
Copy link
Member

All I have to do is copy the version detection code from node-debug, and use the old flags when runtimeExecutable is set. I just don't want to change it this late in the month.

There are now far more people using node2 with node 8 than node 6, this needs to be fixed...

@weinand
Copy link
Contributor Author

weinand commented Aug 28, 2017

The latest node-debug extension (available in the frozen Insiders) passes the version string (e.g. "v7.9.0") as a property __nodeVersion to the DAs whenever it had probed for the version by running node --version.

@roblourens
Copy link
Member

Thanks! However I realized that I still need to test even when node-debug doesn't do version detection, like when "protocol": "inspector" is set.

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Sep 26, 2017
@weinand weinand added the verified Verification succeeded label Sep 29, 2017
@Deilan
Copy link

Deilan commented Oct 17, 2017

Still having the warning as of Node 8.7.0 and VS Code 1.17.1:

image

Debugger listening on ws://127.0.0.1:23988/5b5294e3-fe2b-4f1c-9045-1998fd739672
For help see https://nodejs.org/en/docs/inspector
Debugger attached.
(node:6044) [DEP0062] DeprecationWarning: `node --inspect --debug-brk` is deprecated. Please use `node --inspect-brk` instead.

@nicemaker
Copy link

works for me with latest node and latest visual studio, running debug mode via npm. I use nodemon to track file changes.

In package.json:

scripts:{
"debug": "DEBUG=pd* nodemon --inspect-brk --harmony --nolazy server.js -e js,mustache,json,yaml"
}

I run debug script via terminal, always running in background and restarting automatically on file changes. Make sure you use --inspect-brk.

Then default debug launch configuration for node from latest VS Code:

{  "type": "node",
    "request": "attach",
    "name": "Attach",
    "port": 9229
}

@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
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants