Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Live server installed but not working in VS code

I have installed the live server extension but the browser does not update after I save my HTML or other files. What might be causing a problem?

like image 312
Sypder Avatar asked Jan 18 '26 08:01

Sypder


1 Answers

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
}
like image 180
Elyasaf755 Avatar answered Jan 20 '26 21:01

Elyasaf755