|
|
|
|
|
by eyelidlessness
1860 days ago
|
|
It doesn’t work for callback-based async (including native Promises, but some libraries like Bluebird can help). But it does work for suspending async functions (native async/await, generators)! This also applies to Error#stack and debugger call stacks. I’m actively moving some projects I inherited from Promise APIs to async/await for this reason. |
|
It preserves the call stack as soon as you use ‘await’ instead of ‘[promise].then’?