await Promise.resolve(1)
in chrome devtools (chrome version 70.0.3538.77) resolves to:
1
when script execution is not pausedPromise <pending>
when script execution is pausedHow to resolve it to 1
when script execution is paused
N.B.
this question continues chrome debugger promises dont resolve while paused? to find the exact way to resolve promises when chrome is paused
Pausing script execution is F8 (when looking at the Sources tab, as of Chrome 45) or Ctrl + / .
# Enable async debugging in ChromeGo to the Sources panel of Chrome Canary DevTools. Next to the Call Stack panel on the right hand side, there is a new checkbox for "Async". Toggle the checkbox to turn async debugging on or off. (Although once it's on, you may not ever want to turn it off.)
In order to “freeze” the browser, we will need to first open devTools, and then use F8 (fn + F8 on osx) to pause script execution whenever you want. The debugger will pause, and you'll be able to inspect the elements on the screen in their current state, Simple as that!
Alternatively, you can pause on a particular line of JavaScript. To try this out, use the following shortcut from the Sources Panel: Mac: F8 or _Command + \_ Windows: F8 or _Control + \_
Answer - it's not possible to make promises resolve WHEN js is paused in chrome, even promises that are created in console
(js is single threaded)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With