dfilatov / vow

ES6-compatible and Promises/A+ implementation for Node.js and browsers
MIT License
344 stars 45 forks source link

resolve #80 Add support for debug mode #81

Closed Ajaxy closed 9 years ago

dfilatov commented 9 years ago

Why not use async call stack in the dev tools?

Ajaxy commented 9 years ago
  1. We have to use done for that, but it can likely be missed somewhere. And it's out of promises spec.
  2. Otherwise we have to use Pause On Caught Exceptions, but it can be harassing with the code that uses many try..catch blocks, for example in loops, for example jQuery.
  3. It is not quite handy to navigate from done through all those vow callbacks to the orginal error spot.
  4. There is no async call stack in Firebug.
  5. Actually it doesn't work the right way even in Chrome. Stack trace of this
function start () {
    vow.resolve(1).then(thenWithError).done();
}
function thenWithError () {
    throw new Error('error');
}
start();

leads to start(), not to thenWithError() where error was actually thrown. http://fiddle.jshell.net/zu89eydy/show/

dfilatov commented 9 years ago

Discussed by voice, rejected