How to debug Angular application in VSCode using Edge browser?

前端 未结 2 1968
旧巷少年郎
旧巷少年郎 2021-01-13 04:37

I am using Edge extension. Below is configuration in launch.json:

\"configurations\": [
    {
      \"name\": \"ng serve\",
      \"type\": \"ed         


        
2条回答
  •  情歌与酒
    2021-01-13 05:40

    The following does hit the breakpoint, but they do show up as unverified in vscode (open circle). I think this might have to do with inline source maps.

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "debug chrome",
                "type": "chrome",
                "request": "launch",
                "url": "http://localhost:4200/#",
                "webRoot": "${workspaceFolder}",
                "sourceMapPathOverrides": {
                    "webpack:/./*": "${webRoot}/*",
                    "webpack:/src/*": "${webRoot}/src/*",
                    "webpack:/*": "*",
                    "webpack:/./~/*": "${webRoot}/node_modules/*"
                }
            },
            {
                "name": "debug edge",
                "type": "edge",
                "request": "launch",
                "url": "http://localhost:4200/#",
                "webRoot": "${workspaceFolder}",
                "sourceMapPathOverrides": {
                    "webpack:/./*": "${webRoot}/*",
                    "webpack:/src/*": "${webRoot}/src/*",
                    "webpack:/*": "*",
                    "webpack:/./~/*": "${webRoot}/node_modules/*"
                },
    
            },
            {
                "name": "ng test",
                "type": "chrome",
                "request": "launch",
                "url": "http://localhost:9876/debug.html",
                "webRoot": "${workspaceFolder}"
            },
            {
                "name": "ng e2e",
                "type": "node",
                "request": "launch",
                "program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
                "protocol": "inspector",
                "args": ["${workspaceFolder}/protractor.conf.js"]
            }
        ]
    }
    

提交回复
热议问题