-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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 debugging async/await with Babel transpilation not working, breakpoints jumping #45345
Comments
Most likely this is a problem of the generated source maps and nothing we can fix. @roblourens correct? |
@weinand Meaning this is an issue or potentially bug with how Babel has decided to generate their source maps? |
Yes, the source maps are the only information that we have for mapping back JS to the original source. Tools exist that visualize how JS maps to source. |
Makes sense, bummer. I'll look into opening this issue against them. Seems like it is only around async/await, found one other issue babel/babel#2515 talking about in relation to Babel but they closed it as not actionable. Do you happen to know if there is a spec where I can point them to specifically what is not implemented correctly? |
Can you try it in chrome devtools and see whether it's any better than VS Code? |
.babelrc { babel sourceMaps has some problem,I guess thank you very much. |
Spent awhile investigating this and other babel-related complaints. Couldn't find any difference between the vscode and chrome devtools experiences, across different babel setups. So I'll continue to close these as just weird sourcemaps from babel. |
Steps to Reproduce:
Expected behavior - I can step through the code as normal debugging steps
Actual behavior - breakpoints jump to function declaration line
Note - When I remove async/await from code, debugging works as expected.
Does this issue occur when all extensions are disabled?: Yes
Launch.json
Package.json scripts section
.babelrc
Update. Example of function where breakpoints can't be set. Almost any line I try to set a breakpoint on, the breakpoint puts itself on the exports.createUser line.
The text was updated successfully, but these errors were encountered: