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

后端 未结 10 492
夕颜
夕颜 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 18:02

    The alternative way using WebStorm node debugger.

    In short:

    1. You need WebStorm
    2. Create new Node debug profile in WebStorm
    3. Set path to your mocha binary into Path to Node App JS File
    4. Add breakpoints and start the session from WebStorm

    Detailed instruction with screenshots by Glenn Block.

提交回复
热议问题