30 September, 2018
0 Comments
1 category
I compiled a very simple node.js express application with tsc (TypeScript) on the command line and wanted to debug it with VSCode, but when I pressed F5 I got the error: Cannot launch program ‘…/app/ts’ because corresponding JavaScript cannot be found.
I expected the paths in the launch.json to be wrong, but that was not the case.
The problem was that I did not generate *.js.map files.
After I changed the tsconfig.json file, to generate *.js.map files, I could debug the application.
tsconfig.json
{
“compileOnSave”: false,
“compilerOptions”: {
“target”: “ES2015”,
“module”: “commonjs”,
“sourceMap”: true,
“strict”: true
}
}
Category: Uncategorized