Can't set breakpoints in my angular app after moving to Angular 7

45 Views Asked by At

After upgrading Visual Studio Code (to ver 1.85.1) I was getting warning in the Debug Console WARNING: Processing source-maps of 'xxx' took longer than 'yyy' ms and the app was very slow, however I could set the breakpoints in my app. I have found the solution on internet to set the resolveSourceMapLocations variable in launch.json. So my launch.json looks like this:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
   
    "configurations": [

        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:4200",
            "webRoot": "${workspaceFolder}",
            "sourceMaps": true,
            "resolveSourceMapLocations": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/dist/**/*.js",
                "**/node_modules/**"
            ],
        }
    ]
}

The warning has disappeared, my angular app is responsive again, but now I can't set the breakpoints. The "sourceMap": true in my tsconfig.json to generate sourcemaps. Can somebody please help me to set my launch.json so I can set breakpoint in my angular map.

0

There are 0 best solutions below