Here is my launch.json
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "Launch Server",
"request": "launch",
"program": "${workspaceRoot}/server/src/app.ts",
"cwd": "${workspaceRoot}",
"env": {
"NODE_ENV": "dev"
},
"skipFiles": [
"node_modules/**/*.js"
],
"outFiles": [
"${workspaceRoot}/dist/server/src/*.js"
],
"sourceMaps": true,
"stopOnEntry": true,
"console": "internalConsole"
},
My source folder:
My dist folder:
The error I get is:
Cannot launch program '/Dev/myapp/server/src/app.ts'; setting the 'outFiles' attribute might help.
If I change the "program" property to ""program": "${workspaceRoot}/dist/server/src/app.js", it works but I'm then debugging the transpiled javascript and not the typescript. Obviously the transpiling with .map files is working, what is wrong?
tsconfig.json
{
"compilerOptions": {
"allowJs": false,
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es6",
"dom"
],
"mapRoot": "./",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./dist",
"sourceMap": true,
"target": "es6",
"typeRoots": [
"node_modules/@types"
]
},
"exclude": [
"web",
"dist",
"node_modules"
]
}