【发布时间】:2015-05-25 22:43:27
【问题描述】:
为了能够调试gulpfile.js,执行node-inspector 的正确方法是什么?
我尝试过以下操作(我的 gulpfile 中的代码需要 harmony 和 harmony-arrow-functions switches):
node-debug --nodejs --harmony --nodejs --harmony-arrow-functions /home/user/.npm-packages/bin/gulp default
节点检查器已正确加载,但是在文件为 loaded 之前和之后都无法在 gulpfile 中设置断点。也无法在 gulp/index.js 和 orchestrator/index.js 文件中设置断点。并且不可能“进入”以下语句(whole source):
gulpInst.start.apply(gulpInst, toRun);
环境:
- Fedora 21 x64
- 节点检查器 v0.9.2
- 节点 v0.12.0
- 一饮而尽
- CLI 版本 3.8.11
- 本地版本 3.8.11
【问题讨论】:
标签: javascript node.js debugging gulp node-inspector