R3Tech R3Tech - 1 year ago 136
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"

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download