一、安装插件
在 Visual Studio Code 中打开扩展面板(快捷键 Ctrl+Shift+X
),搜索安装 Debugger for chrome
插件)。
二、配置启动参数
在 Visual Studio Code 按下面的顺序点击就可以打开launch.json
文件。
添加如下配置:
{
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceRoot}",
"runtimeExecutable":"E:\\Applications\\UserAppli