【发布时间】:2018-12-25 08:06:57
【问题描述】:
How to debug Angular application in VSCode using Edge browser? 我已经尝试过这里的建议,但都不起作用。 我本来想对最后一个答案发表评论,但我没有 50 名声望这样做,而且回答问题是不礼貌的,所以我在这里问另一个问题。
上述主题中的两个launch.json 建议不起作用,“Debugger for Edge”中自动生成的launch.json 也不起作用。 我分别尝试了它们无济于事(见下文)
{
"version": "0.2.0",
"configurations": [
{
"type": "edge",
"request": "launch",
"name": "Launch Edge against localhost(Debugger for Edge)",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "debug edge (Answer 1 from topic, I removed the things about Chrome was I wouldn't use that browser)",
"type": "edge",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
"webpack:/./*": "${webRoot}/*",
"webpack:/src/*": "${webRoot}/src/*",
"webpack:/*": "*",
"webpack:/./~/*": "${webRoot}/node_modules/*"
},
},
{
"name": "ng e2e",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
"protocol": "inspector",
"args": ["${workspaceFolder}/protractor.conf.js"]
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Edge (Answer 2 from topic)",
"type": "edge",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceFolder}",
"sourceMaps": true,
"trace": true,
"userDataDir": "${workspaceRoot}/.vscode/edge"
}
]
}
浏览器启动并显示页面(应用程序),但未命中断点。在 VSCode 中,红点变为空心圆。
上面的 launch.json 应该在单独的代码块中,但编辑器不允许我使用 标签。
【问题讨论】:
标签: angular debugging visual-studio-code microsoft-edge