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