Skip to content
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

Allow flag to disable transformation of async/await calls #2990

Closed
zikaari opened this issue Aug 22, 2017 · 7 comments
Closed

Allow flag to disable transformation of async/await calls #2990

zikaari opened this issue Aug 22, 2017 · 7 comments

Comments

@zikaari
Copy link
Contributor

zikaari commented Aug 22, 2017

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

@gaearon
Copy link
Contributor

gaearon commented Aug 22, 2017

Yea. I think there's an issue for allowing different environments for development and production. Could you look for it?

@zikaari
Copy link
Contributor Author

zikaari commented 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)

@zikaari
Copy link
Contributor Author

zikaari commented Sep 16, 2017

Any progress towards this?

cc @gaearon

@Timer
Copy link
Contributor

Timer commented Sep 16, 2017

Nothing on this front yet, @NeekSandhu. Please keep an eye on #1249.

@Timer Timer closed this as completed Sep 16, 2017
@zikaari
Copy link
Contributor Author

zikaari commented Sep 16, 2017

I've been, that discussion has been been still for quite some time.

@Timer
Copy link
Contributor

Timer commented Sep 16, 2017

You can try to push that pull request forward, but we won't be adding special treatment for async/await -- it'll need to be accomplished through browser target support.

@Timer
Copy link
Contributor

Timer commented Sep 16, 2017

Feel free to make a new PR. 😄

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants