Egg项目使用vscode的debug模式跑单元测试
launch.json文件配置如下:
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Egg Test", "runtimeExecutable": "npm", "runtimeArgs": [ "run", "test-local", "--", "--inspect-brk" ], "protocol": "auto", "port": 9229, "autoAttachChildProcesses": true, "disableOptimisticBPs": false, } ]
添加后debug窗口选择run:Egg Test
查资料不过是偏门,撸源码才是脱离苦海的正道。