I'm currently facing an issue with running my angular2 project from vs code. Below are the contents of my tsconfig and launch.json files.
tsconfig.json
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceRoot}/src",
"sourceMaps": true
// "runtimeExecutable": "/usr/bin/chromium-browser",
// "sourceMapPathOverrides": {
// "webpack:///*": "/*"
// }
},
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"port": 9222,
"sourceMaps": true,
"webRoot": "${workspaceRoot}/src"
// "sourceMapPathOverrides": {
// "webpack:///*": "/*"
// }
}
]
}
I have encountered an issue where setting breakpoints in my vscode editor gets disabled automatically due to a mapping problem.