Open In App

How to Enable Live Server on Visual Studio Code?

Generally, when we make any change in our code, to see those changes on the browser we need to manually refresh the page to see the changes happening. Here the live server extension comes into the picture. After it has been installed, an automated localhost will be able to run in your browser, which you can start with a single button. Once you make changes in your code or write something new, after saving it, the browser will auto-refresh itself, then you will be able to see the changes quickly and automatically. The live server enables you to open an HTML document, and it runs a server for you and opens a browser window with the file in it. 

Steps for Installing and Enabling Live Server on Visual Studio Code 

Step 1: Click on the extensions option available on the left side in Visual Studio Code.



 

Step 2: Search Live Server in the search box and install it.

 

Step 3: The live server extension has been installed.



 

Step 4: Click on Go live present at the bottom.

 

Step 5: The default browser will get opened automatically once you click on the go live.

 

This is how you can turn on the live server mode on Visual Studio Code.

Article Tags :