-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
sourcemaps not working correctly with static properties #35307
Comments
I'm having a hard time reproducing this. Are you able to craft a minimal repro that does not require imports/logic specific to your project? The repro I attempted to create seems to work fine when debugging and breakpoints are hit, and I've verified that the source maps in question properly line up with between the original sources and the generated outputs. |
We have a repro in our botframework-cli project, but I'll try to craft a minimal one over the weekend. Thanks for pinging me on this, Ryan. |
I resolved this issue by updating the target to |
If someone has a concrete repro, please file a new issue with it. Thanks! |
TypeScript Version: 3.8.0-dev.20191122 (also reproduced on @latest (3.7.2)
Search Terms:
typescript sourcemaps not working with static properties
Code
This issue is specifically when trying to consume the generated sourcemaps in vscode.
From: https://github.com/microsoft/botframework-cli/blob/91881c3be6bf3888f97f86ff7d9b314871bf5d5b/packages/dialog/src/commands/dialog/verify.ts#L14-L29
If the below static properties are placed before other code in my class, then the sourcemap that's generated is off and debugging tools like VS code will have their breakpoints misplaced.
Additional debugging info (including full source for the file and generated content.
(If you attempt to build the project for a local repro, you'll need to look at the contributor guide. We use rush to orchestrate building the projects).
launch.json snippet config for verify
generated files:
verify ts
verify js
verify.js.map
Expected behavior:
When I set a breakpoint on line 37 & 42, I'd expect it to hit that.
Actual behavior:
It's off by 3 (40 and 45) & it actually thinks its somewhere deep in the execute method.
Workaround:
Move the static properties to the bottom of the class and everything works as expected.
Playground Link: N/A
Related Issues: N/A
The text was updated successfully, but these errors were encountered: