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

Debug: Attach to Node Process: cannot enable debug mode for process (Error: kill EPERM) #206683

Closed
x-yuri opened this issue Mar 2, 2024 · 1 comment · Fixed by microsoft/vscode-js-debug#1987
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@x-yuri
Copy link

x-yuri commented Mar 2, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.86.2
  • OS Version: Arch Linux

Steps to Reproduce:

a.js:

debugger
$ code --disable-extensions

$ docker run --rm -itv "$PWD/a.js:/a.js" -p 9229:9229 alpine:3.19 \
    sh -euxc 'apk add nodejs && node --inspect-brk=0.0.0.0 a.js'
  • Ctrl-Shift-P
  • Debug: Attach to Node Process
  • Choose the node --inspect-brk process and you'll see:

2024-03-02_15-48

With the following command it works (I assume here that you're running under UID 1000):

$ docker run --rm -itv "$PWD/a.js:/a.js" -p 9229:9229 alpine:3.19 \
    sh -euxc 'apk add nodejs shadow && useradd a \
        && su a -c "node --inspect-brk=0.0.0.0 a.js"'

Is it really needed to have access to the process? Chromium DevTools for one doesn't need that. Then the following is rather out of scope, but what about remote debugging?..

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.87.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@roblourens roblourens assigned connor4312 and unassigned roblourens Mar 4, 2024
@connor4312 connor4312 added debug Debug viewlet, configurations, breakpoints, adapter issues bug Issue identified by VS Code Team member as probable bug labels Mar 4, 2024
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Apr 5, 2024
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Apr 5, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants