I had serious performance issues when VS Code debugging a Node project with TypeScript , so I found that changing protocol=='inspector' and targeting es2017 allowed es2017 to quickly and reliably debug. Here is the configuration I used ...
launch.json
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Launch Program", "program": "${workspaceRoot}/lib/main.js", "protocol": "inspector", "runtimeArgs": [ "--harmony", "--no-deprecation" ], "outFiles": [ "${workspaceRoot}/lib/**/*.js" ], "skipFiles": [ "${workspaceRoot}/node_modules/**/*.js" ], "smartStep": true } ] }
tsconfig.json
{ "compilerOptions": { "target": "es2017", "module": "commonjs", "declaration": true, "sourceMap": true, "outDir": "lib", "lib": [ "dom", "es2017" ], "suppressImplicitAnyIndexErrors": true, "allowSyntheticDefaultImports": true }, "compileOnSave": true, "exclude": [ "node_modules" ], "include": [ "src" ] }
SliverNinja
source share