what's the least resistance path to debugging mocha tests?

后端 未结 10 496
夕颜
夕颜 2020-12-12 17:18

Edit Nov 2016: Node now has a built in debugger that you can start with --inspect. This answer explains it: https://stackoverflow.com/a/39901169/30946.

10条回答
  •  孤城傲影
    2020-12-12 17:56

    With the latest versions of Mocha and node-inspector, this has been working great for me:

    $ node-debug ./node_modules/mocha/bin/_mocha
    

    It loads up the local Mocha executable as the debugged process, stopping on the first line for you to set up your breakpoints.

提交回复
热议问题