查看gulp异常的完整堆栈跟踪

时间:2015-07-14 15:19:23

标签: gulp gulp-watch postmortem-debugging

gulp watch任务不断抛出异常,堆栈跟踪限制为10帧,所以我无法分辨它的起源。我猜这必须是可配置的,但我无法确定在哪里。我查看了gulp.config.js和gulp.util.js。我读过this report,但我认为它必须比这更容易。

谁知道怎么做?

2 个答案:

答案 0 :(得分:1)

这可能有效

gulp.on('err', function(e) {
    console.log(e.err.stack);
});

答案 1 :(得分:1)

他们让一切完全无用的方式真是太可爱了。一个什么都不告诉你的堆栈跟踪,太好了,这真的很有用......好主意。

你的解决方法是像这样“手动”运行

$ node --stack-trace-limit=5000 --stack-size=10000 $(which gulp) ...