如何debugginggulpfile.js

为了能够debugginggulpfile.js ,执行node-inspector的正确方法是什么?

我试过下面的代码(我的大文件中的代码需要harmonyharmony-arrow-functions switches ):

 node-debug --nodejs --harmony --nodejs --harmony-arrow-functions /home/user/.npm-packages/bin/gulp default 

节点检查器已被正确加载,但不能在加载文件之前或之后在gulpfile中设置断点。 也不可能在gulp/index.jsorchestrator/index.js文件中设置断点。 这是不可能“步入”以下声明( 整个来源 ):

 gulpInst.start.apply(gulpInst, toRun); 

环境:

  • Fedora 21 x64
  • 节点检查器v0.9.2
  • 节点v0.12.0
    • CLI版本3.8.11
    • 本地版本3.8.11

它看起来像你缺less指向你的实际gulpfile.js。 尝试这样的事情:

 node-debug /path/to/your/gulp/install/gulp.js --harmony --harmony-arrow-functions --gulpfile /path/to/your/gulpfile/gulpfile.js default 

我用这个,它的工作原理。