1.配置tsconfig.json
"sourceMap": true
2.终端->配置任务->tsc: 监视 - 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" ] } ]
                    
                
 posted on 
                
            
        
浙公网安备 33010602011771号