需要的插件
Debugger for Chrome
配置
点击左边的那个蜘蛛,添加一个调试配置文件,内容
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:4200",
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
}
]
}
tiaosh
首相启动angular
ng serve
点击vscode 上的调试或者F5会自动启动一个chrome
现在就可以在vscode上进行断点调试