Mocha breakpoints using Visual Studio Code

后端 未结 20 1323
星月不相逢
星月不相逢 2020-12-12 11:52

Is it possible to add breakpoints to ones Mocha tests using Visual Studio Code?

Normally when debugging code one need to configure the launch.json, setting the prog

20条回答
  •  情歌与酒
    2020-12-12 12:25

    Here is an example of launch configuration (launch.json) from Microsoft, which works with Mocha and allows using the debugger.

    Also, there is a description of how to use the --debug-brk option.

    Finally, here is an alternative version of how to debug code with Mocha tests using tasks.json file of VS Code and Gulp task runner.

提交回复
热议问题