0

IDE Visual studio CODE

tsconfig.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "ES2022",
    "module": "es2020",
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "lib": [
      "es2018",
      "dom"
    ],
    "useDefineForClassFields": false
  },
  "angularCompilerOptions": {
    "enableI18nLegacyMessageIdFormat": false
  }
}

angular.json

            "development": {
              "buildOptimizer": false,
              "optimization": false,
              "vendorChunk": true,
              "extractLicenses": false,
              "sourceMap": true,
              "namedChunks": true
            }

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Uruchom przeglądarkę Chrome względem hosta lokalnego",
            "url": "http://localhost:4200",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

sourcemap: true, standard chrome configuration, various things, still points are not reacheable. I would like to debug my code before lauching chrome breakpoints are red, but after lauching they are grey.

1 Answers1

0

ng serve --host=127.0.0.1

with explicitly telling ng to run app on host 127.0.0.1, making debugger run without errors and breakpoints are read correctly.

Suddenly gets Could not read source map in VSCode using Angular