Live Server in VS Code Ubuntu does not automatically open the browser tab. Need Help

I am using VS Code in Linux. The OS Details are given below

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"

Here's a brief description of what the issue is -

  • I installed the Live Server Extension developed by Ritwick Dey. It's a popular VS Code Extension. I tried to use it with a simple index.html file.

  • It started localhost with the default port 5050.

  • Now the problem is that I need to manually open a browser and type localhost:5050/index.html every time to actually view the output of the file.

  • Once I do this, Live Server starts implementing the changes as I code them in the index.html file.

  • So while Live Server does work, it does not work exactly like it is supposed to since I have to manually open the specific URL every time.

  • For VS Code in Windows, LiveServer opens Chrome automatically as soon as I turn it on, and then it keeps updating the output accordingly as more stuff is coded into the file in VS Code I'm using Chrome as my default Browser.

I have also edited the LiveServer Settings JSON file in VS Code and added these extra settings at the bottom -

"liveServer.settings.CustomBrowser": "chrome"

and

"liveServer.settings.useLocalIp": true

Note -

I have also downloaded Microsoft Edge Beta version for Linux, and I use it as my main browser, but it is not the default browser

3

1 Answer

I think this is too late but same happened to me in Arcolinux. Just had to write as the launcher in settings.json file:

"liveServer.settings.CustomBrowser": "google-chrome-stable"

I left this here just in case this helps anybody else.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like