Skip to content

VS Code shows “Unbound breakpoint” when setting breakpoints in Node.js core files under lib/internal #5103

Closed

Description

@Scoheart

Node.js Version

v24.3.0

NPM Version

11.4.2

Operating System

Darwin Scohearts-MacBook-Pro.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64

Subsystem

Other

Description

When I try to debug Node.js core by setting breakpoints directly in files under lib/internal/* (opened from the Node.js source checkout) using VS Code, those breakpoints remain Unbound and never hit.

Minimal Reproduction

.vscode/launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "cppdbg",
      "request": "launch",
      "name": "lldb-node",
      "program": "${workspaceFolder}/out/Debug/node",
      "args": [
        "--inspect-brk=9229",
        "--import=${workspaceFolder}/mytest/register.mjs",
        "${workspaceFolder}/mytest/index.js"
      ],
      "cwd": "${workspaceRoot}",
      "environment": [
        {
          "name": "NODE_DEBUG",
          "value": "*"
        }
      ],
      "MIMode": "lldb"
    },
    {
      "name": "js-attach",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "restart": true,
      "skipFiles": [],
      "smartStep": false
    }
  ],
  "compounds": [
    {
      "name": "C++ + JS",
      "configurations": [
        "lldb-node",
        "js-attach"
      ]
    }
  ]
}

Output

No response

Before You Submit

  • I have looked for issues that already exist before submitting this
  • My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask

Activity

  1. avivkeller commented on Oct 9, 2025

    @avivkeller
    Member

    The node executable bundles all of its source files. Adding breakpoints to the lib folder, which, are the un-bundled files, won't do anything.

    However, if you compile the node with https://github.com/nodejs/node/blob/main/BUILDING.md#loading-js-files-from-disk-instead-of-embedding, VSCode breakpoints will work.

  2. added
    answered🎉 Yay! The issue has been resolved, or the question has been answered.
    on Oct 9, 2025
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

    answered🎉 Yay! The issue has been resolved, or the question has been answered.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions