denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.81k stars 5.26k forks source link

Missaligned code maps #13533

Open dpeter99 opened 2 years ago

dpeter99 commented 2 years ago

Hi!

I'm currenlty having an issue debugging deno from WebStorm. I t looks like the line mapping is offset by some amount. (Changes depending on the file)

Versions:

Deno

deno 1.18.1 (release, x86_64-pc-windows-msvc)
v8 9.8.177.6
typescript 4.5.2

Webstorm

WebStorm 2021.3.1 Build #WS-213.6461.79, built on December 28, 2021

Example:

In my project: dpeter99/archivist, placing the breakpoints like in the screenshot webstorm64_NAmVvmB1Oq In the file FileReaderModule.ts Results in breaking at the first breakpoint but none of the varaibles are definied. The state of the obect looks similar as to what it should have at the end of the constructor, 4 lines above. The run configuration that i used was the following: image

dpeter99 commented 2 years ago

This issue persists even with the currently newest version

deno 1.20.2 (release, x86_64-pc-windows-msvc)
v8 10.0.139.6
typescript 4.6.2

I think the number of lines it is offset by is the number of include lines at the top of the file.

bartlomieju commented 2 years ago

@dsherret could you take a look? Seems like comments are not properly taken into account.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

dpeter99 commented 1 year ago

Hi! Sorry to necro this issue but I just jumped back into working on my deno project and I'm still having this issue. A solution would be really useful for this as it is really hard to work on a project when the debugger is misaligned.