Open Bug 1513010 Opened 6 years ago Updated 3 years ago

`await foo` in console may do nothing while paused in debugger

Categories

(DevTools :: Console, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: jorendorff, Unassigned)

References

Details

Suppose we're paused in the debugger, and the user types `await foo` into the console. Imagine that `foo` is a local variable, a promise that isn't going to be resolved as long as we're paused. I didn't check, but I think we currently attach some event handlers to the promise and that's it. So *nothing* happens in the UI in response to the user's `await foo`. This isn't great UX. And later, when we unpause and the value *does* appear in the console, it's unclear where that value came from. So the user is surprised twice.
Some discussion about this on the devtools slack: <jlast> @jorendorff that is true. we assume it will be fast, but we should show some kind of progress UI <jimb> Yeah, that's not so great. There ought to be a little notification that appears, and then get cleared away once the promise is resolved. <jorendorff> @jlast but it won't be fast if it's a promise that's going to be resolved by something in the microtask queue which we have blocked because we're paused <jorendorff> yeah maybe it should immediately show a placeholder with some dots, like jlast said <jlast> very true. we should show that it is "in progress" maybe suspended in the console... ... <jimb> @jorendorff But the user has asked us to pause the debuggee. <jorendorff> yeah, and then they asked us to await a promise... they've kind of asked for two contradictory things <jimb> Maybe the UI text should actually point this out, "Waiting for promise to resolve; this might require letting the program continue" <jorendorff> it might be neat to have a :arrow_forward: button in the placeholder UI, like "let the debuggee run until this promise gets resolved" <jlast> this seems like console ux now
See Also: → 1463671
Priority: -- → P2
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.