browser attempts to open local host every time I run any script in vs code file

474 views Asked by At

The issue: I have a project folder full of scripts for a project, some js, html, and python. Recently, whenever I run any of them, regardless of wheather or not they produce html elements, they all try to open my browser (edge) to a local host page. In the case of all but my html page, the result is that the script does not execute as it fails in attempting to connect to a local host instead. Sorry, I know this is vague but don't understand this behavior.

Tests: I created two test python files that do nothing but print("this is a test python file"). They contain exactly the same line of code AND are running on the same interpreter.The one within my project folder however opens my browser, and the other one just prints "this is a test python file" in the terminal as I would expect.

Possible causes: Recent browser related changes I have made that may have somehow caused the problem:

  1. Had to change the default browser in my launch.json file from chrom"type": "pwa-chrome", to "type": "pwa-msedge", additionally I changed the url from "url": "http://localhost:8080", to "url": "http://localhost:8000",.

  2. I installed "Live Server" as I was having issues loading the local host page in my browser and various forums instructed to do so. While this did make it possible to load my html page on my local host, the elements within it, created by other scripts, don't load as they can't be run because of this issue.

I don't know if these have anything to do with my issue, but given the problem occurred only after these steps, I figured it was likely.

Please let me know if I can provide any more useful information.

Thank you for reading.

0

There are 0 answers