Allow flag to disable transformation of async/await calls
See original GitHub issueNow that Chrome devtools debugger supports stepping over async/await calls, it is extremely helpful when debugging async code.
For example, right now, if I’m paused on
40| const res = await fetch('https://example.com');
// sourcemapped code, not actual
and I hit step over, debugger suddenly jumps to some random line, totally out of context as far as I am concerned.
Now here’s where pure gold is, if await
calls are not transformed by babel and remain as they are, and again I’m on
40| const res = await fetch('https://example.com');
on hitting step over I jump to, as I’d expect
41| const text = await res.text();
… and so on
Without this, the only option I can use is console.log
, …really painful.
It would be a great addition, maybe we can have this behind a flag of some sort, like yarn start --keep-async
Thoughts, welcome
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Is it possible to await an event instead of another async method?
My question is: how can I suspend the execution of GetResults in such a way that it awaits an event such as the...
Read more >Avoiding simple mistakes in async await - Anthony Steele
Let the async flow. Use await not .Result to get the result of a task. Avoid becoming synchronous again wherever possible. Avoid Task.Run ......
Read more >Use Promise.all to Stop Async/Await from Blocking Execution ...
Use Promise.all to Stop Async/Await from Blocking Execution in JS. When writing asynchronous code, async/await is a powerful tool — but it comes...
Read more >Using async/await in SwiftUI - Swift Evolution | Peter Friese
Let's see how we can improve this code by using async/await. The first step is to get rid of all the callbacks. Instead,...
Read more >Using asynchronous web APIs from WebAssembly
handleSleep() , call Asyncify.handleAsync() . Then, instead of having to schedule a wakeUp() callback, you can pass an async JavaScript function ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The most relevant one I guess is this Make target browsers configurable #1249
(Underlying logic of both proposals is exact same, both involves skipping or applying polyfills/transformations)
Feel free to make a new PR. 😄