我正在使用Edge extension。以下是launch.json
中的配置:
"configurations": [
{
"name": "ng serve",
"type": "edge",
"request": "launch",
"url": "http://localhost:4200/",
"webRoot": "${workspaceFolder}",
"sourceMaps": true
}]
根据VS Code中的文档,这是更详细的步骤:
我尝试清除所有断点,重新启动vs代码(和计算机),关闭所有浏览器实例,但是仍然得到相同的行为。调试器能够在浏览器中启动angular应用程序,但无法达到断点。
因此,是否有其他配置可以使其与Edge浏览器一起使用。
当前配置在chrome浏览器中可以正常工作(只需在launch.json中将edge替换为chrome)。
最佳答案
现在,此配置似乎对我有用。
它在断点处中断并显示为可用。
{
"name": "Edge",
"type": "edge",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceFolder}",
"sourceMaps": true,
"trace": true,
"userDataDir": "${workspaceRoot}/.vscode/edge"
}
我猜他们做了一些修复。
关于angular - 如何使用Edge浏览器在VSCode中调试Angular应用程序?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50013884/