{
async function foo() {
return new Promise((resolve, reject) => {
setTimeout(resolve, 500)
})
}
async function bar() {
await foo()
console.info('foo done')
}
bar()
}
I open a snippet in chrome devtools source tab, and put above code in it. But I can't put any breakpoint to this. Breakpoints can be added only when there is no async/await functions in code.
What's more, I have never succeed debugging any async/await code in chrome devtools. Sometimes breakpoints added moved to wrong places, sometimes code pause at places with no breakpoints.
Is it a bug of chrome?