0

This problem came up after a month or so with no problems. Running a Python script in VS Code on Windows 10, I suddenly get a Chrome window open with the message telling me that my own localhost (8080) is refusing a connection. Chrome is listed in my firewall to accept both private and public connections. Before this came up, Python scripts were sending output to the terminal window in VS Code as expected. Thanks

JTMeade
  • 1
  • 2

1 Answers1

0

Without knowing the code, the best thing I could suggest is changing the port being used to something else, such as 5000, since port 8080 often requires permission to be used. You could try running VS as administrator as that would presumably allow the port to be used or try running the script from command prompt.

Usually a popup would appear asking whether you would like to allow port 8080 to be used.

Maybe take a look at: Visual Studio Code debugger with Chrome refused to connect to localhost

Thierryonre
  • 74
  • 2
  • 4