Score:1

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

ng flag

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

in flag
This is a VS Code issue from the sounds of it. Have you [submitted a bug report](https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions)? If this doesn’t work for you, there’s a chance it doesn’t work for others as well
garykapoor7 avatar
ng flag
@guiverc what else should i include to make it clear? I have put a brief description of how the issue is produced. I have also explained that it works just fine in Windows. What exactly it is that you dont understand? The english and the order in which i have described seems just fine because one more user (matigo) was able to understand the problem.
garykapoor7 avatar
ng flag
@matigo I dont think this is an issue with VS Code since it works fine on WIndows. But i'll still try to submit a bug report. Given how popular linux is among developers, and the fact that this extension has around 15 million downloads, I am kinda surprised this issue still persists. Anyway, thanks for your suggestion!
Score:1
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.