Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoint Debugging Not Working with Node.js 23.2.0 and 23.3.0 in Visual Studio Code #56156

Closed
IsmaelCoulibalyPLRM opened this issue Dec 6, 2024 · 1 comment

Comments

@IsmaelCoulibalyPLRM
Copy link

Version

23.2.0

Platform

Windows: PowerShell 7.4.6
OS Name:   Microsoft Windows 11 Business
OS Version: 10.0.22631 N/A Build 22631  64-bit

Subsystem

Subsystem The affected subsystem appears to be the Node.js Debugger or the integration between Node.js and Visual Studio Code's debugging tools. Specifically, the issue involves setting breakpoints during the debugging session, which fails to work properly starting from Node.js version 23.2. This clearly indicates which part of the system is likely malfunctioning (the debugger subsystem) and which components are involved in the issue.

What steps will reproduce the bug?

  1. nstall Node.js version 23.2 (or later).
  2. Set up a simple Node.js project (e.g., an app.js file with basic script logic).
  3. Configure the debugger in Visual Studio Code with the following launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/app.js",
      "skipFiles": ["<node_internals>/**"]
    }
  ]
}
  1. Start the debugger and set a breakpoint on a valid line of code.
  2. Run the application using the debugger.

Observed Behavior
Breakpoints fail to set correctly, and Visual Studio Code shows a message indicating that some breakpoints cannot be applied.
The application continues execution without stopping at the breakpoints.

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

The issue occurs every time I try to use the debugger with Node.js version 23.2.0 or later.
The problem is consistently reproducible when using the default debugger configuration in Visual Studio Code, regardless of the specific project or code.
There doesn't appear to be any additional conditions needed; it consistently happens with the latest versions of Node.js starting from 23.2.0

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

The debugger should stop at the defined breakpoints, as it does with Node.js version 23.1.0 or earlier.

What do you see instead?

When starting the debugger in Visual Studio Code with Node.js version 23.2.0 or 23.3.0:
Breakpoints fail to activate, and a message appears stating:
"Some of your breakpoints could not be set."
The application runs without stopping at the defined breakpoints, even if they are placed on valid lines of code.
The debugger does not behave as expected and bypasses all breakpoints.

Additional information

Reverting to Node.js version 23.1.0 resolves the issue.
The issue persists even with the latest stable version of Visual Studio Code and its Node.js debugger extension.
The same problem occurs regardless of sourcemap usage or other debugger configurations.

This issue seems to originate from Node.js 23.2 and later, as debugging works fine with earlier versions.

@JMTK
Copy link

JMTK commented Dec 6, 2024

Duplicate of #55948

@Flarna Flarna closed this as completed Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants