-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Auto Attach for node js not working, Breakpoints not hit #146932
Comments
Can you please run |
|
Same issue on Mac OS Monterey, M1 Pro. Switching Node from 16 Arm to 14 x86 doesn't help. I can run with |
Same for me. It doesn't attach automatically. |
Now I figured out what was wrong. I had some custom export NODE_OPTIONS="--max-old-space-size=8192" I discovered that by enabling AutoAttach in VSCode, the VSCode is setting NODE_OPTIONS and VSCODE_INSPECTOR_OPTIONS, e.g.: NODE_OPTIONS=--require "/Users/<User>/Library/Application Support/Code/User/globalStorage/ms-vscode.js-debug/bootloader.js" --max-old-space-size=8192 ${env:NODE_OPTIONS}
VSCODE_INSPECTOR_OPTIONS=${env:VSCODE_INSPECTOR_OPTIONS}:::{"inspectorIpc":"/var/folders/8s/2dg05wjn62s42zzbvwm2by2w0000gn/T/node-cdp.10069-11.sock.deferred","deferredMode":true,"waitForDebugger":"","execPath":"/Users/<User>/.nvm/versions/node/v16.17.0/bin/node","onlyEntrypoint":false,"autoAttachMode":"always" So my -- export NODE_OPTIONS="$NODE_OPTIONS --max-old-space-size=8192" |
@Platonn You've just saved an hour or two for me! I did not think that VSCode might make use of |
@jameswestbv do you have capabilties set on your Node binary? You may be hitting nodejs/node#37588 |
@connor4312 Yep - that seems to be it. Doesn't seem like anyone is in a hurry to fix it - probably one of those things that people think that setcap shouldn't really be used and things should run purely unprivileged... 🥱 So either change your code to not need setcap or, in my case, or give it a bit of this
🙊 |
Thanks. Apologies for the slow response, I forgot about that issue at the time and this fell off my queue. Closing as a dupe of that one.. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
Debugger should auto attach (it does on Windows) and hit the break point - but it doesn't on Ubuntu
Ubuntu.mp4
Version: 1.66.0
Commit: e18005f
Date: 2022-03-30T05:50:41.156Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Linux x64 5.13.0-37-generic
Expected behaviour on Windows 11 - same version of VS Code
Windows.mp4
Version: 1.66.0 (system setup)
Commit: e18005f
Date: 2022-03-30T05:50:14.623Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.22000
The text was updated successfully, but these errors were encountered: