javascript - How to debug gulpfile.js - Stack Overflow

What is the proper way to execute node-inspector in order to be able to debug gulpfile.js?I've tri

What is the proper way to execute node-inspector in order to be able to debug gulpfile.js?

I've tried following (code in my gulpfile requires harmony and harmony-arrow-functions switches):

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

Node inspector was properly loaded however it was not possible to set breakpoint in gulpfile neither before nor after the file was loaded. It was also not possible to set breakpoints in gulp/index.js and orchestrator/index.js files. And it was not possible to "step into" following statement (whole source):

gulpInst.start.apply(gulpInst, toRun);
Environment:
  • Fedora 21 x64
  • Node Inspector v0.9.2
  • node v0.12.0
  • gulp
    • CLI version 3.8.11
    • Local version 3.8.11

What is the proper way to execute node-inspector in order to be able to debug gulpfile.js?

I've tried following (code in my gulpfile requires harmony and harmony-arrow-functions switches):

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

Node inspector was properly loaded however it was not possible to set breakpoint in gulpfile neither before nor after the file was loaded. It was also not possible to set breakpoints in gulp/index.js and orchestrator/index.js files. And it was not possible to "step into" following statement (whole source):

gulpInst.start.apply(gulpInst, toRun);
Environment:
  • Fedora 21 x64
  • Node Inspector v0.9.2
  • node v0.12.0
  • gulp
    • CLI version 3.8.11
    • Local version 3.8.11
Share asked Mar 23, 2015 at 1:07 czernyczerny 16.8k14 gold badges74 silver badges103 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

It looks like you're missing pointing to your actual gulpfile.js. Try something like this:

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

I use this and it works.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744854947a4597349.html

相关推荐

  • javascript - How to debug gulpfile.js - Stack Overflow

    What is the proper way to execute node-inspector in order to be able to debug gulpfile.js?I've tri

    2天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信