-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
--debug is deprecated #21883
Comments
@ruskakimov what node version are you using? |
@weinand v7.7.1 |
The deprecation message is correct and produced by that version of node. (In short: add a |
I am still seeing this deprecation message even after using
in my launch.json. This is also with VS Code 1.10.1 and Node.js 7.7.1 on macOS. Am I missing something? The suggested fix doesn't change anything. |
@steve-p-com Did you add it to the existing config for program launch? {
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}",
"cwd": "${workspaceRoot}",
"protocol": "auto"
} This works for me. But adds an experimental feature warning 🤣. |
Yes. Because it was a new project today I just added {
"type": "node",
"protocol": "inspector",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/index.js"
}, but the result should be the much same I guess. When I changed launch.json, it initially continued to produce the deprecation warning. Now though, it is behaving as expected. What is more puzzling is that if I remove the {
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/index.js"
}, it doesn't revert to producing the deprecation warning, even though it seems like it should. That seems weird. |
Never mind, I've figured out what's going on. There is an unexpected (to me) difference in behaviour between start and restart debugger commands. Unless you stop the debugging session completely and use start again, it doesn't pick up any changes in launch.json. I was under the impression that restart was just shorthand for stop followed by start, but evidently it is not. |
@ruskakimov funny that, you wouldn't think running the latest release versions of code and node would have only "depreciated" or "experimental" debug options. |
VS Code 1.10.x does no longer use the term "experimental" (and it never used the "deprecated" for a node version). It it node that produces these "deprecated" or "experimental" messages without providing some "normal" option:
and
|
@weinand It doesn't look like setting {
"version": "0.2.0",
"configurations": [
{
"name": "DEV",
"type": "node",
"request": "launch",
"protocol": "inspector",
"program": "${workspaceRoot}/index.js",
"stopOnEntry": false,
"args": [
"dev"
]
},
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}/public",
"userDataDir": "${env:TEMP}/VSCodeChrome/${workspaceRootFolderName}"
}
],
"compounds": [
{
"name": "DEV/Chrome",
"configurations": [
"DEV",
"Chrome"
]
}
]
} Also, even when running just |
@ksix @ruskakimov @weinand @steve-p-com @ugate |
@bb-bibo the warning message is produced by node.js when using the '--inspect' flag. |
@weinand Thank you for solving my problem!love u~ |
@weinand I'm running Visual Studio Code v1.12.2 and NodeJs v8.0.0.
Thanks |
@Gappa88 the launch config is correct and you can safely ignore the "--debug-brk" deprecation warning. Without more information I have no clue why VS Code freezes. Which OS? Is this reproducible? When and how does VS Code freeze? /cc @roblourens |
@weinand Thank you very much |
- Force new protocol. - Fix test glob. https://code.visualstudio.com/updates/v1_10#_node2-transitioning microsoft/vscode#21883
I also get the deprecation warning. Node 8.4.
|
Still expected, tracking in #27731 |
Console output on debugging:
DeprecationWarning: node --debug is deprecated. Please use node --inspect instead.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: