microsoft / microsoft/vscode-js-debug

`node --inspect-brk` unexpectedly skips first line when there are breakpoints set

Open
#2,338 0 comments 0 reactions 1 assignee View on GitHub

@connor4312 is already working on this.

Since Apr 5, 2026.

bug
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

  1. Create test.js below in cwd.
  2. Open folder in VS Code.
  3. Ensure there are no breakpoints in VS Code set.
  4. Run node --inspect-brk test.js and use Attach to Node Process.
  5. Expectedly, it stops at the second line.
Image
  1. Now stop debugging and add a breakpoint at line 4.
  2. Run node --inspect-brk test.js and use Attach to Node Process.
  3. Expected - debugger to stop at second line. Instead it ignored the second line and stops at the first breakpoint, line 4.
Image
// 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.