R3Tech R3Tech - 1 month ago 8x
TypeScript Question

Typescript debugging in Visual Studio Code

i tried this solution: http://stackoverflow.duapp.com/questions/31169259/how-to-debug-typescript-files-in-visual-studio-code

But if I make a breakpoint in my .ts files it's says the file not found for the debugger. The breakpoint in the .js files works. The Sourcemaps exists.

the launch configuration:

"name": "DEBUG",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/src/app.ts",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"env": {
"NODE_ENV": "development"
"externalConsole": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/cmpl"


It is a problem with your tsconfig.json. You must check if config contains correct sourceRoot compiler option set to the right path to your .ts sources.

sourceMap also must be set to true. You can double check path correctness, inspecting any of your .js.map files, where sources and sourceRoot fields must point to the right path to your .ts source file.