PromisesDebuggerExtension
PromisesDebuggerExtension copied to clipboard
Catch promises inside |then| handlers
This code produces 2 log promises instead of one.
Promise.resolve(123).then(function(val) {
return new Promise(function(resolve) {
setTimeout(function() {
resolve(val + ' resolved 2');
}, 2000);
});
});
But in the mean time, this code should produce 2 log promises:
var outer;
Promise.resolve(123).then(function(val) {
outer = Promise.resolve('foo');
return 'bar';
});