Live Server - Not Opening in Chrome Browser

I am currently working part 1 of Code with Mosh HTML5 & CSS3 Series. I am having trouble with the Live Server extension. When I right-click on my HTML code in Visual Studio Code and select “Open with Live Server,” I get the following error message:

Live Server - Not Opening in Chrome Browser

Is there a way to have it open in the Chrome browser instead of getting this error message?
Any help would be greatly appreciated! slight_smile:

Did you restart VSCode after installing Live Server?
What if you open http://localhost:5500/ in Chrome?

1 Like

Thanks for the reply!
Also, yes, I restarted VSCode after installing Live Server.
But for some reason it won’t open the Chrome browser automatically when I select “Open with Live Server" in Visual Studio Code.

However, your suggestion of opening Port: 5500 under local IP helped and worked out.
Thank you for the tip!

I guess my follow up is do you happen to know why Visual Studio Code doesn’t open my Chrome browser automatically with the HTML file when I select “Open with Live Server," and instead causes me to have to submit the local URL with port 5500 in the Chrome browser manually in order for Live Server it to work? I was wondering if maybe it was something in my Live Server settings.

Sorry in advance as I am still a beginner, so I am not sure if I phrased my follow-up question correctly. I hope it makes sense. Thanks again!

Are html pages automaticly opened in Chrome when you double click on them? Or do you use Edge or Firefox as your standard browser.

Html pages automatically open in Chrome when I double click on them.
html opens in chrome

Based on the error:

Got Browser Preview extension installed?

Do you have installed this in VSCode? If yes disable this extension, restart VSCode and try again Live Server.

It’s so strange because with the Browser Preview extension installed I don’t receive the error message; however, Live Server opens in the Browser Preview extension, when installed and enabled (like below), but then that means it doesn’t open in the Chrome browser.

It seems like when the Browser Preview extension is disabled or uninstalled, I receive the error message below.

At least I know now that I have Browser Preview (as a backup) and the ability to manually put the localhost IP and port 5500 into the Chrome browser address bar (with Live Server enabled); these seem to be nice alternatives to Live Server just opening automatically in the Chrome browser. Thanks again for your help on this.

How do you restart the VSCode, pls help…

Just close and start VSCode.

1 Like