有没有办法在node.js中启动exception或testing失败的debugging器?

我正在寻找的基本上是nosetest --pdb --pdb-failures 鼻子testing框架 nosetest --pdb --pdb-failures

我正在使用摩卡进行testing。 我想要做的就是运行testing

mocha --break-on-exception --break-on-failure一旦遇到exception或断言失败就停止执行testing,将启动节点检查器 ,并允许我内省runninng代码。

这是可能的任何地方在node.js世界,任何库或testing框架?

添加此行到您的testing:

 if (global.v8debug) global.v8debug.Debug.setBreakOnException() 

mocha --debug-brk开始mocha --debug-brk ,连接节点检查器,继续并等待exception