I am trying to run angular app and when I type ng serve --open it runs fine but when I run using VS code localhost configuration, it shows localhost refused to connect error: ERR_CONNECTION_REFUSED. I have following configuration in launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "localhost (Chrome)",
"url": "https://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}
I tried clearing Chrome cache, checking firewall and trying other settings but it does not work. Browser console does not show any error as well. I tried running on different port but it does not work. In incognito it works but does not hit the debugger at all. What are the other things I can try to make this work in Chrome?