Skip to content

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

Closed
microsoft/vscode-js-debug
#1987
@x-yuri

Description

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?..

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions