question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow flag to disable transformation of async/await calls

See original GitHub issue

Now 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
zikaaricommented, Aug 22, 2017

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)

0reactions
Timercommented, Sep 16, 2017

Feel free to make a new PR. 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found