title: How to debug external js files in angular
body: <p>Not sure if this is the right place to post a question (if not, let me know).
  I'm new to Angular and i would like to somehow debug one of the external js files in my project with "Debugger for chrome" or any other way...</p>
  
  <p>tools:
  visual studio code v1.13.1
  node v6.10.3
  angular cli v10.0.6</p>
  
  <p>launch.json</p>
  
  <pre><code>{
  "version": "0.2.0",
  "configurations": [
  
      {
          "type": "chrome",
          "request": "launch",
          "name": "Launch Chrome against localhost",
          "url": "http://localhost:4200/",
          "webRoot": "${workspaceRoot}",
          "sourceMaps": true
      },
      {
          "type": "chrome",
          "request": "attach",
          "name": "Attach to Chrome",
          "port": 9222,
          "sourceMaps": true,
          "webRoot": "${workspaceRoot}"
      }
  ]
  </code></pre>
  
  <p>angular-cli.json</p>
  
  <pre><code>{
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "project": {
      "name": "debugging-test"
    },
    "apps": [
      {
        "root": "src",
        "outDir": "dist",
        "assets": [
          "assets",
          "favicon.ico"
        ],
        "index": "index.html",
        "main": "main.ts",
        "polyfills": "polyfills.ts",
        "test": "test.ts",
        "tsconfig": "tsconfig.app.json",
        "testTsconfig": "tsconfig.spec.json",
        "prefix": "app",
        "styles": [
          "../node_modules/bootstrap/dist/css/bootstrap.css",
          "../node_modules/icheck/skins/square/aero.css",
          "styles.css"
        ],
        "scripts": [
          "../node_modules/jquery/dist/jquery.js",
          "../node_modules/icheck/icheck.js"
        ],
        "environmentSource": "environments/environment.ts",
        "environments": {
          "dev": "environments/environment.ts",
          "prod": "environments/environment.prod.ts"
        }
      }
    ],
    "e2e": {
      "protractor": {
        "config": "./protractor.conf.js"
      }
    },
    "lint": [
      {
        "project": "src/tsconfig.app.json"
      },
      {
        "project": "src/tsconfig.spec.json"
      },
      {
        "project": "e2e/tsconfig.e2e.json"
      }
    ],
    "test": {
      "karma": {
        "config": "./karma.conf.js"
      }
    },
    "defaults": {
      "styleExt": "css",
      "component": {}
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/7scbT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7scbT.png" alt="enter image description here"></a></p>
  
  <p>No problems with debugging ts files, or any code that i had written.</p>
  
  <p>All the code of a needed file is presented in a single string, i guess it is bundled, that's the reason why i can't debug it.</p>
  
  <p>I'm placing breakpoints, but when debugger runs they become grey with message "Breakpoint ignored because generated code not found (source map problem?)"</p>
  
  <p>Is there a way how i can accomplish that? 
  (using vs code, or in chrome browser does not matter)</p>
  
  <p>In case of need I will provide all additional information.</p>
  
  <p>Thanks in advance!</p>