Trying to debug program through mocha (using --deb

2019-07-29 07:37发布

问题:

I installed this open source projects and mocha tests run but I want to debug the functions called by the tests but when I try to debug (using mocha --debug-brk), i see that debug is in the mocha code itself..

How do i accomplish this?

回答1:

I get past this same issue by using node-inspector to add my real breakpoint, and just click pause/continue, which will stop at the real breakpoint then.