节点检查员,mocha不能使用'debugger'命令 [英] node inspector with mocha not working with 'debugger' command

查看:139
本文介绍了节点检查员,mocha不能使用'debugger'命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用摩卡测试我的代码。我正在使用节点检查器来调试我的代码。



bash
摩卡测试/测试* --debug-brk



这是有效的,但不是很好。它停在摩卡车的第一行代码。我想让它在我的代码停止。我尝试使用调试器关键字进行手动断点,但有一些不能停止。

解决方案

尝试放置每个此问题的摩卡库底部的断点。由于某些原因允许您的模块中的调试器语句暂停节点调试器。



但是它似乎不停止在规范本身的调试器语句。我有一个 SO问题突出显示该问题。


I am using mocha to test my code. I am using node inspector to debug my code.

bash mocha test/test.* --debug-brk

This works but not so well. It stops at the first line of code in mocha. I want it to stop it at my code. I tried using the 'debugger' key word to make a manual breakpoint but some how it does not stop there.

解决方案

Try placing a breakpoint at the bottom of the mocha library per this issue. For some reason that allows debugger statements in your modules to pause the node debugger.

However it doesn't seem to stop at debugger statements in the spec itself. I have a SO question highlighting that problem.

这篇关于节点检查员,mocha不能使用'debugger'命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆