Attach to a running process
Attach to a running Node.js process inside the container
Opening a Dev Containers window provides access to the container filesystem and process list. It does not attach the JavaScript debugger automatically. Attaching connects VS Code’s debugger to an already-running Node.js process instead of starting another copy of the application.
Dev Containers window -> <REMOTE_ROOT>
-> Ctrl+Shift+P
-> Debug: Attach to Node Process
-> node <ENTRYPOINT>
-> breakpoints under <REMOTE_ROOT>When the image starts through CMD ["npm", "start"], the process list commonly contains both an npm parent and the actual node <ENTRYPOINT> application process. The Node.js process is the debug target.
npm start
└── node <ENTRYPOINT> <- attach hereFind by: vscode, dev containers, attach node process, running container, npm parent, node entrypoint, remote debugging, breakpoint