nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
105.22k stars 28.5k forks source link

Attached debugger always stops on first line #51837

Open chepa92 opened 4 months ago

chepa92 commented 4 months ago

Version

21.6.0

Platform

23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:59 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6030 arm6

Subsystem

No response

What steps will reproduce the bug?

starting dev server with script "node --import tsx/esm --inspect ./index.ts" attaching debugger from vscode/webstorm to port 9229 on break point, debugger stops on first line in file

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

happens only on versions 21.6.0+, on older versions everything works fine

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

No response

What do you see instead?

debugger always stops in first line of each file where breakpoint located

Additional information

No response

targos commented 4 months ago

Thanks for the report. We'll need more precise steps, such as the contents of the index.ts file and how the breakpoint is defined because I cannot reproduce with a simple file (with or without tsx/esm).

ajvincent commented 5 days ago

Possibly the same as #53681 based on the summary. I had a similar problem with both ts-node and tsimp, against NodeJS 20.15 but not NodeJS 18.19.