I just created a new project and have run it for the first time using F5 or Ctrl + F5, the result in Chrome is:
The site can't be reached
err_connection_refused
I checked the option at the breakpoints for "Exceptions caught" and the following error is displayed.
Without "Exceptions caught" checked, the next error raised:
I tried to run "ng s -o" from the terminal and all work fine. The site is working well on port 4200, but I like to debug.
Here is my launch.json file, all by default:
{
// 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}"
}
]
}
Why is this happening?
I was able to get mine running by clicking "Add Configuration" and including the command that we specify in our package.json file and use for running during development.
For me, the issue was react/next.js application was not running. Basically, you have to keep the application running in a separate window/terminal to be able to attach the debugger. This is unlike the other application where it starts from debug console itself.
I displaied a similar message in my debug console and the problem was that the local web server was turned off, therefore unreachable. I turned on the server in the virtual machine and the app started working again :-)
In my case, the problem was because port 4200 was taken by another application (Docker). As soon as I changed the port to 4201 by adding the next structure in the serve section of angular.json file the problem was solved.
"options": {
"port": 4201
}
Try to use HTTP instead HTTPS from Google Chrome with an incognito window.
This may be of use to someone working on a project that communicates across iframes, I found this warning within a current web application: Crbug/1173575, non-JS module files deprecated.
In my case, the reason was that the resource iframe origin wasn't being served meaning the Iframe request URL was not accessible. When serving the resource the warning disappeared.
Removing these lines two worked for me. Its an Https error
var cors = require('cors');
app.use(cors());
I ran into this error on 3 separate Next.js projects. Same error in Chrome, Chrome Incognito, Firefox, and Edge. Happened on production build (next build && next start) and dev server (next dev). After trying a number of fixes – ensuring I was on HTTP not HTTPS, checking if port was in use, deleting node_modules and running npm install, etc. – the thing that finally worked was restarting my computer...
Posting here in case anyone has run into this issue when using Next.js – hopefully this helps, and I'd love to hear what causes the error!
My problem was in the network settings of my Windows 10 computer not on the browser. I have tried my URL in another computer and mobile browsers and it was working fine.
So, I have fixed the issue by resetting my network settings
To do that, go to Settings -> Network and Internet -> Scroll down to network reset
Wait for 5 minute until it restarts.
This issue I face while debugging in vs code for an Angular application.The probable causes may be the server is not up and listening to port.You may start the server manually by ng serve --port with port number .Also compare URL in lauch.json and compare the port number
In Visual Studio Code you can use the "normal" Dart&Flutter run and debug config.
If you don't have an emulator opened, the app will automatically open in the Chrome browser.

{
// 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": [
{
"name": "app",
"request": "launch",
"type": "dart"
},
{
"name": "app (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
}
]
}
Tested in VSCode 1.62.3 with Dart 2.14.4 and Flutter 2.8.0-3.3.pre