Skip to content

Node.js v23.2.0: Breakpoints not binding in VS Code debugger #55948

Description

@carlmattsimpao

Version

v23.2.0

Platform

Microsoft Windows NT 10.0.19045.0 x64

Subsystem

Node.js Debugger (V8 Inspector)

What steps will reproduce the bug?

Install Node.js v23.2.0

Create a simple JavaScript file:

test() {
    console.log("test");
    console.log("test2");
}
test();
  • Set breakpoints in VS Code
  • Start debugging session using VS Code's built-in JavaScript debugger
  • Observe that breakpoints are not hit

How often does it reproduce? Is there a required condition?

Reproduces 100% of the time with Node.js v23.2.0. Issue does not occur with v23.1.0.

What is the expected behavior? Why is that the expected behavior?

Debugger should pause execution at set breakpoints, allowing inspection of program state.

What do you see instead?

Program runs without stopping at breakpoints. Breakpoints appear hollow/unfilled in VS Code, indicating they are not binding to the code.

Additional information

  • Downgrading to Node.js v23.1.0 resolves the issue
  • Using standard VS Code debugging configuration:
{
    "type": "node",
    "request": "launch",
    "name": "Debug Program",
    "skipFiles": ["<node_internals>/**"],
    "program": "${workspaceFolder}/test.js"
}

VSCode:

Version: 1.95.3 (user setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

Activity

  1. ksn5 commented on Nov 22, 2024

    @ksn5

    +1

  2. korodarn commented on Nov 22, 2024

    @korodarn

    I experienced the same behavior in 23.3.0 as well.

  3. connor4312 commented on Nov 22, 2024

    @connor4312
    Contributor

    Looks like Node 23 no longer can enumerate named pipes on Windows which causes this:

    PS C:\Users\conno> fnm use 22
    Using Node v22.6.0
    PS C:\Users\conno> node
    Welcome to Node.js v22.6.0.
    Type ".help" for more information.
    > fs.readdirSync('\\\\.\\pipe').length
    838
    
    PS C:\Users\conno> fnm use 23
    Using Node v23.3.0
    PS C:\Users\conno> node
    Welcome to Node.js v23.3.0.
    Type ".help" for more information.
    > fs.readdirSync('\\\\.\\pipe').length
    Uncaught Error: ENOTDIR: not a directory, scandir '\\.\pipe'
        at Object.readdirSync (node:fs:1499:26) {
      errno: -4052,
      code: 'ENOTDIR',
      syscall: 'scandir',
      path: '\\\\.\\pipe'
    }
    

    Seems to have happened in 23.2, 23.1 works fine. I don't see any suspicious changelog entries for this, just #55527 from @rvagg. Maybe something went wrong in the revert? 🤔

    We use this check to detect if the pipe to connect to the debugger is still available when we're operating in the synchronous debug bootloader; Windows lacks any kind of API aside from this for checking the existence of a named pipe, as exists / stat actually connects to the pipe.

  4. purnay commented on Nov 26, 2024

    @purnay

    +1

  5. connor4312 commented on Nov 26, 2024

    @connor4312
    Contributor

    Made a more specific issue for the underlying bug: #56002

  6. tuankiet2s commented on Dec 3, 2024

    @tuankiet2s

    +1

  7. crossrw commented on Dec 10, 2024

    @crossrw

    +1

  8. connor4312 commented on Dec 10, 2024

    @connor4312
    Contributor

    should be fixed in the next release with the resolution of #56002

  9. StefanStojanovic commented on Dec 12, 2024

    @StefanStojanovic
    Contributor

    I'll go ahead and close this issue since #56002 is closed. If needed (eg. not fixed in the next release), please feel free to reopen.

  10. Glavyanov commented on Feb 24, 2025

    @Glavyanov

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions