I had this problem and I solved it by changing the port number in the settings.json file to an opened one.
To get to the settings.json file you just click CTRL+SHIFT+P, then type "settings", click the "Preferences: Open Settings (JSON)", then paste this inside the { }:
"liveServer.settings.port": 0
This will randomly pick an opened port each time. This is how my JSON file looks like:
{
"liveServer.settings.port": 0
}
If there are multiple lines in the JSON file, make sure each line is separated by a comma(,), like this:
{
"liveServer.settings.CustomBrowser": "microsoft-edge",
"liveServer.settings.port": 0
}
Answer from Elyasaf755 on Stack OverflowI had this problem and I solved it by changing the port number in the settings.json file to an opened one.
To get to the settings.json file you just click CTRL+SHIFT+P, then type "settings", click the "Preferences: Open Settings (JSON)", then paste this inside the { }:
"liveServer.settings.port": 0
This will randomly pick an opened port each time. This is how my JSON file looks like:
{
"liveServer.settings.port": 0
}
If there are multiple lines in the JSON file, make sure each line is separated by a comma(,), like this:
{
"liveServer.settings.CustomBrowser": "microsoft-edge",
"liveServer.settings.port": 0
}
Re-install the extension and restart your text editor to fix the issue.
Problem in Vs code (Vs code Live server is not Working)
VS Code Live Server Doesn't Load/Always Refreshing.
VS Code Live Server not working
Visual studio code live server not giving me the preview
Videos
Hello, The Visual Studio Code Live Server extension doesn't work properly for me anymore. When I open a live server on any project, the project opens a tab with the live server port (http://127.0.0.1:5500/) as intended however any project I open will make the tab always stuck on refreshing. This causes many issues such as images/assets not loading all the time, Javascript/typescript not working and also Any changes after I press save on a project won't automatally update to the live server. I attached a video of the problem.
A little more info: The extension used to work for me ~4 months ago and I hadn't used VS code since then as I was working on a different project that didn't need me to use VS Code. The problem still happens no matter what is loaded, the word "Hello" could be the only thing in the body of the html and it would still have the issue. (Also yes I use <meta charset = “UTF-8”>, I saw someone mention it in another thread)
What I've tried:
Reinstalling VS Code and extensions (Same problem)
Trying the Insider Version (Same Problem)
I changed Autosave to AutoDelay
DIsabling every extension except live server and disabling every chrome extension.
Also any other extension similar to Live Server doesnt work such as Five Server, Live Preview etc
If anyone has had this problem, or can help with the issue, or has any question let me know! Thanks!
Hello , am not sure this is the right place but when i open my htlm file with live server on google chrome , normal or Incognito mode its not working
this : https://cdn.discordapp.com/attachments/703709336370675913/1052567823165181963/image.png is what i am getting
I tried changing my browser , changed the live server version , changed the port nothing works .
I checke some google videos that told me to switch port , change folder name nothing works
Thanks in advance
edit: no its not .htlm was just a solution that did not work from youtube : https://cdn.discordapp.com/attachments/703709336370675913/1052588668289822730/image.png but no mater the file live server preview does not work for
edit2: ok i had to rename a few things it starting to work !
The problem was that live server was not updating changes so obviously it would not show any even if the other problems where solved,the solution was to change
• Open settings.
• Search for 'autosave'.
• Set it to 'afterDelay'.
It works fine ! thanks guys <3
hello everyone , i've install live server in my vscode with ubuntu OS. suddenly its not working . i've tried reinstalling vs code still its not working . i paste this command "liveServer.settings.CustomBrowser": "chrome" in user.json setiings still it doesnt do anything .Not even getting the go live button in the status bar . Is there any solution to fix the problem .
Any help would be appreciated.