New issue
Advanced search Search tips

Issue 807445 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 833928
Owner:
Closed: Sep 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Allow await while at a break point in an async function.

Reported by string...@gmail.com, Jan 30 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

Steps to reproduce the problem:
1. Put a break point in an async function
2. While paused at the break point, run some code in the console using await

What is the expected behavior?
I don't know if this is possible (this is a feature request), but it would be really nice to be able to await the result of the call inline while paused in the debugger.

What went wrong?
It appears to ignore the await keyword and returns the promise returned from evaluating the expression.

Did this work before? N/A 

Chrome version: 63.0.3239.108  Channel: stable
OS Version: 
Flash Version: 

I'm writing some e2e tests using puppeteer, and it would be awesome to try out some different async APIs while paused at a breakpoint.
 

Comment 1 by l...@chromium.org, Jan 31 2018

Cc: l...@chromium.org
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report.  I've run into similar cases myself wondering why an 'await' command is taking forever, then realizing I'm paused inside an async function.  I'm not sure how feasible it is to do this.

kozy@, do you think this could be feasible in the future?  If not, perhaps we want to invest in console promise previews that automatically show their resolved result when they resolve.  Maybe something like `Promise {<pending>}` ==> `Promise {<resolved value>: 'foo'}`

Comment 2 by string...@gmail.com, Jan 31 2018

I thought maybe it could be done in a similar way to live code editing, but it turns out I get a "LiveEdit failed: uncaught [object Object]" when I try to do a live edit in an async function.

I attached a .gif to this tweet;

https://twitter.com/1stringham/status/958484092676288513

Perhaps this is a bug we should file.

With the idea of using it to run puppeteer while at a break point, it would have to actually allow execution to continue similar to what happens when you "step over" an await statement.
Status: Duplo (was: Assigned)
Mergedinto: 833928
Status: Duplicate (was: Duplo)

Sign in to add a comment