Run node inspector with mocha

后端 未结 2 1078
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 17:45

I can\'t seem to debug mocha scripts.

I am able to run node with inspector like this node --inspect script.js. This then gives me a url to go to to debu

相关标签:
2条回答
  • 2020-12-28 18:10

    The problem was my version of mocha. I was running a version older than 3.1.0. --inspect support was added in 3.1.0

    I am now able to run with debugging with these lines:

    mocha --reporter spec --inspect test.js
    mocha --reporter spec --inspect-brk test.js
    
    0 讨论(0)
  • [DEP0062] DeprecationWarning: node --inspect --debug-brk is deprecated. Please use node --inspect-brk instead.

    use in the future

    mocha --reporter spec --inspect-brk test.js
    
    0 讨论(0)
提交回复
热议问题