WENJUN CHI
WENJUN CHI

Reputation: 523

`vscode debug angular can't hit breakpoint: breakpoint set but not yet bound

I refered the method in this article:How To Debug An Angular Application In Chrome to debug the angular app in vscode with Debugger for Chrome, but cannot hit the breakpoint: breakpoint set but not yet bound.

vscode version: 1.41.0
angular version: 8.2.14
Debug for chrome version: 4.12.6

My project struct is:

|--.vscode
|      |--lanuch.json
|--dist
|    |--ng-app
|          |--index.html
|          |--...
|          
|--projects
|     |--ng-app
|     |    |--e2e
|     |    |--src
|     |
|     |--ng-demo
|          |--e2e
|          |--src 
|     
|--angular.json
|--tsconfig.json
|--package.json

I want to debug ng-app, the launch.json file content:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:4200",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

I don't know where's wrong, and how to solve it. I searched on google, but not get an appropriate answer.

Thanks!

Upvotes: 1

Views: 3746

Answers (1)

Ian Vink
Ian Vink

Reputation: 68810

It's the webRoot, it need to point to the application:

"webRoot": "${workspaceFolder}/myapp/src",

Upvotes: 1

Related Questions