Debug: Attach to Node Process: cannot enable debug mode for process (Error: kill EPERM) #206683
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:
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?..