Shameless ad
Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission.
The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers.
By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.
What is Microsoft Visual Studio Code Live Server?
Live Server is a Microsoft Visual Studio extension that enables you to:
Launch a local development server with live reload feature for static & dynamic pages.
marketplace.visualstudio.com
Prerequisites
Microsoft Visual Studio Code is installed.
How to Install Live Server in Microsoft Visual Studio Code
Open Microsoft Visual Studio Code.
![Common Microsoft Visual Studio Code Open Microsoft Visual Studio Code](https://11714007canadainc.com/media/images/Common-Microsoft-Visual-Studio-Code-Open-Microsoft-Visual-Studio-Code.jpg)
Click on the Extensions icon.
![VS Code Click Extensions Icon](https://11714007canadainc.com/media/images/VS-Code-Click-Extensions-Icon.jpg)
Add the Live Server Extension in VS Code
In the Search Extensions in Marketplace box, enter live server. Several choices will be shown.
Find the one called Live Server by Ritwick Dey. Click on its Install button.
![VS Code Live Server Click Install](https://11714007canadainc.com/media/images/VS-Code-Live-Server-Click-Install.jpg)
Wait several seconds for the Live Server extension to install. When the installation is done, you will see this:
![VS Code Live Server Extension is Installed](https://11714007canadainc.com/media/images/VS-Code-Live-Server-Extension-is-Installed.jpg)
At the bottom left, click on the Manage icon.
![VS Code Click Manage Icon](https://11714007canadainc.com/media/images/Mac-VS-Code-Click-Manage-Icon.jpg)
Then click on Settings.
![VS Code Click on Settings](https://11714007canadainc.com/media/images/Common-Microsoft-Visual-Studio-Code-Go-To-Settings.jpg)
Remove all text from the Search Settings search box. Set Files: Auto Save to either off or afterDelay.
If Auto Save is off, you will have to press Cmd-S to save the file before the browser will update.
If Auto Save is set to afterDelay, then the browser will update about one second after you made a change to the file. This is the setting I prefer. Sometimes, I press Cmd-S if I want a browser update without changing my file.
![VS Code Set AutoSave to afterDelay](https://11714007canadainc.com/media/images/Mac-VS-Code-Set-AutoSave-to-afterDelay.jpg)
Go to Settings. Enter live server browser into the Search Settings bar. Use Live Server: Custom Browser to select the browser you wish Live Server to use. The default, null, selects the default browser.
![VS Code Live Server Custom Browser Settings Chrome Null](https://11714007canadainc.com/media/images/VS-Code-Live-Server-Custom-Browser-Settings-Chrome-Null.jpg)
![select browser](https://11714007canadainc.com/media/images/VS-Code-Live-Server-Custom-Browser-Settings.jpg)
![Quit VS Code](https://11714007canadainc.com/media/images/Common-Microsoft-Visual-Studio-Code-Quit-Microsoft-Visual-Studio-Code.jpg)
![Open VS Code](https://11714007canadainc.com/media/images/Common-Microsoft-Visual-Studio-Code-Open-Microsoft-Visual-Studio-Code.jpg)
Wait for Go Live to be displayed. This can take a few seconds. If it doesn’t show up, click on a HTML or PHP file and then wait a few seconds for Go Live to show up.
![VS Code just starting](https://11714007canadainc.com/media/images/VS-Code-Live-Server-status-bar-before-Go-Live.jpg)
![VS Code Go Live displayed](https://11714007canadainc.com/media/images/VS-Code-Go-Live-.jpg)
Click on Go Live.
![click on Go Live](https://11714007canadainc.com/media/images/VS-Code-Live-Server-Click-Go-Live.jpg)
Alternatively, you can right-click on the HTML file you want to open. Then click on Open with Live Server.
![Live Server Open with Live Server](https://11714007canadainc.com/media/images/Live-Server-Open-with-Live-Server.jpg)
Live Server will start up.
![VS Code Live Server is Starting](https://11714007canadainc.com/media/images/VS-Code-Live-Server-Only-Installed-Live-Server-Starting.jpg)
Live server is now running.
![VS Code Live Server is Running](https://11714007canadainc.com/media/images/VS-Code-Live-Server-is-Running.jpg)
Right-click on the HTML file you want to open, then click Open with Live Server. You only have to do this once per HTML file you want displayed in the browser.
![open with live server](https://11714007canadainc.com/media/images/Live-Server-Open-with-Live-Server.jpg)
The browser will display the HTML file.
![Live Server is Running](https://11714007canadainc.com/media/images/Live-Server-is-Running.jpg)
When you make changes to the HTML file, and it is saved, the browser will update the webpage.
![Live Server Browser Updated](https://11714007canadainc.com/media/images/Live-Server-Browser-Updated.jpg)
Live Server is now installed!