我可以:
但是如何使用节点检查器调试nodeunit测试?
我试过了,但没有工作:
nodeunit --debug myNodeUnitModule_test.js
它不起作用。- 我试着安装 NODEBUG。
并像这样使用它:
nodebug /usr/local/bin/nodeunit myNodeunit_test.js
但它在ubuntu上都不起作用(No such file or directory
)也不是在mac上(env: node\r: No such file or directory
)
几乎是有效的 node --debug / usr / local / bin / nodeunit ./routes/edit/bodyTelInfoArraysToObject_test.js
哪里 /usr/local/bin/nodeunit
是命令采取的路径 which nodeunit
有输出:
debugger listening on port 5858
并在那里执行测试。
但是我不能跳进debuggin:当我打开url时 localhost:8080
在chrome中观看调试:
- 第一次加载我看到空文件列表
- 第二次加载:找不到页面。
在我的nodeunit测试中,我写道 debugger
停止调试那里。
但没什么。