firefox-devtools / ux

Firefox DevTools UX Community
Mozilla Public License 2.0
103 stars 21 forks source link

Top-level await feedback #40

Open nchevobbe opened 5 years ago

nchevobbe commented 5 years ago

(See Bug 1513010)

Let say you evaluate the following in the console:

await new Promise(res => setTimeout(() => res("hello"), 10000))

You will see nothing at all for 10s, then a "hello" will prompt. We should maybe have something displayed as soon as the user evaluate the expression, maybe with a spinner to indicate the evaluation was registered and that we are waiting for the underlying promise to resolved. it would be also nice to have a dedicated message if doing the evaluation when the debugger is paused, because the promise resolution might be tied to the debugger resuming (maybe even have a button to resume the debugger from the console?).

This brings some additional questions:

> expression
---
waking up
---
< hello

but we may not have the data to know if a console.log was fired because of a given expression. In that case: is it okay to break such thing ?