我刚刚创建了一个新项目并第一次使用 F5 或 ctrl + f5 运行它,Chrome 中的结果是“无法访问该站点”
“err_connection_refused”
我尝试从终端“ng s -o”运行并且一切正常,该站点在端口 4200 上运行良好,
但我喜欢调试。
这是我的 launch.json 文件,全部默认
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}
Run Code Online (Sandbox Code Playgroud)
为什么会这样?
angular ×1