Node版本:8.12.0
操做系统:windows10javascript
launch.json
{ "version": "0.2.0", "configurations": [ { "name": "Debug Jest Tests", "type": "node", "request": "launch", "runtimeArgs": [ "--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand" ], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "port": "9229" } ] }
"scripts": { "debugger": "node --inspect-brk ./node_modules/jest/bin/jest --runInBand --no-cache --no-watchman" }
执行代码java
npm run debugger
经过鼠标,或者经过Ctrl+Shift+D
进入VSCode的调试面板。
点击调试便可。node