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

Node.js run and debug ("Launch program") fail to debug #2150

Closed
leduyquang753 opened this issue Dec 16, 2024 · 1 comment
Closed

Node.js run and debug ("Launch program") fail to debug #2150

leduyquang753 opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@leduyquang753
Copy link

Describe the bug

When using run and debug with a Node.js program, the program is launched, but the editor does not successfully establish a debug connection and fails to set breakpoints.

Image

Reproduction
Steps to reproduce the behavior:

  1. Create a script test.js with the following code:
console.log("Started.");

await new Promise(resolve => {
	setInterval(() => {
		console.log("Tick.");
	}, 1000);
});
  1. Set one or a few breakpoints anywhere within the code.
  2. Create launch.json with a Node.js: Launch program configuration:
{
	"version": "0.2.0",
	"configurations": [{
		"name": "Launch program",
		"type": "node",
		"request": "launch",
		"skipFiles": ["<node_internals>/**"],
		"program": "${workspaceFolder}/test.js",
		"trace": true
	}]
}
  1. Issue Start debugging command.
  2. Observe the debug console and the debugging panel, particularly the Breakpoints section.

Log file

vscode-debugadapter-92487e48.json.gz

Visual studio code version

Version: 1.96.0
Commit: 138f619c86f1199955d53b4166bef66ef252935c
Date: 2h29:09,626; 11 Dec 2024 (UTC)
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

Additional context

Tested with Node.js version 23.4.0 and a new empty Visual studio code data folder.

@leduyquang753 leduyquang753 added the bug Issue identified by VS Code Team member as probable bug label Dec 16, 2024
@connor4312
Copy link
Member

connor4312 commented Dec 16, 2024

This is a Node.js regression fixed in their next release nodejs/node#56002 You can use Node 22 for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants