1.配置tsconfig.json
{ "type": "typescript", "tsconfig": "tsconfig.json", "option": "watch", "problemMatcher": [ "$tsc-watch" ], "group": "build", "label": "tsc: 监视 - tsconfig.json" }
3.配置launch.json
"configurations": [ { "type": "node", "request": "launch", "name": "启动程序", "skipFiles": [ "<node_internals>/**" ], "program": "${workspaceFolder}/dist/src/index.js", "preLaunchTask": "tsc: 监视 - tsconfig.json", "outFiles": [ "${workspaceFolder}/dist/src/**/*.js" ] } ]
原文:https://www.cnblogs.com/Allen-0827/p/12673092.html