4

I am using the Chrome Debugger extension for Visual Studio Code with an Angular 2 application where the initial setup was done with the Angular CLI. I have looked at several Stack Overflow questions and tried several things but nothing seems to work. I keep getting the message: Breakpoint ignored because generated code not found

Here is what I have for the tsconfig.json as generated by the Angular CLI

{
  "compilerOptions": {
    "baseUrl": "",
    "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"
    ]
  }
}

Here is what I have for the launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Chrome against localhost, with sourcemaps",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:4200",
            "sourceMaps": true,
            "trace": true,
            "webRoot": "${workspaceRoot}/src",
            "userDataDir": "${workspaceRoot}/.vscode/chrome",
            "sourceMapPathOverrides": {
                "webpack:///C:*":"C:/*"
            }
        }

    ]
}

I have looked at these resources and they did not resolve the issue:

Debug & Run Angular2 Typescript with Visual Studio Code?

http://mattslay.com/debugging-angular2-apps-in-visual-studio-code/

Community
  • 1
  • 1
Greg Finzer
  • 6,714
  • 21
  • 80
  • 125
  • found this with a slightly different launch.json: http://stackoverflow.com/questions/36494938/debug-run-angular2-typescript-with-visual-studio-code – barna10 Apr 28 '17 at 17:33

0 Answers0