microsoft / microsoft/vscode-js-debug
`node --inspect-brk` unexpectedly skips first line when there are breakpoints set
@connor4312 is already working on this.
Since Apr 5, 2026.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 373
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 6
Description
Version: 1.115.0-insider (user setup)
Commit: 3d70aab9a4ed407832e43584ac7a661be08e2d74
Date: 2026-04-03T09:58:58-07:00
Electron: 39.8.5
ElectronBuildId: 13703022
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
- Create
test.jsbelow in cwd. - Open folder in VS Code.
- Ensure there are no breakpoints in VS Code set.
- Run
node --inspect-brk test.jsand use Attach to Node Process. - Expectedly, it stops at the second line.
- Now stop debugging and add a breakpoint at line 4.
- Run
node --inspect-brk test.jsand use Attach to Node Process. - Expected - debugger to stop at second line. Instead it ignored the second line and stops at the first breakpoint, line 4.
// test.js
console.log("line 1")
console.log("line 2")
console.log("line 3")
This seems odd, because --inspect-brk is typically described as activate inspector on host:port and break at start of user script.
But in this case it contradicts its description and if breakpoints are set --inspect-brk is indistinguishable from --inspect-wait (activate inspector on host:port and wait for debugger to be attached).
Not sure if it's node issue or debugger adapters, so reporting it here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.