Home>Article>Development Tools> How to preview web pages in vscode

How to preview web pages in vscode

藏色散人
藏色散人 Original
2020-01-14 11:05:01 9905browse

How to preview web pages in vscode

How to preview a web page in vscode?

VSCode settings web page code real-time preview

Recommended tutorial:vscode tutorial

1. Setting description

1. VSCode is a very good development software. It is smaller than DW and is particularly good for testing the front end. So when we usually develop web pages, we find that we only have to finish writing the code, then save it, and then refresh it in the browser. Check the effect and then repeat it. We found that a lot of time was wasted on these three steps.

2. In fact, we can configure a web server in VSCode. After modifying the code, we only need to save the code browser to preview it in real time

2. Operation steps

1 .Open VScode, click the last one on the coordinate toolbar to enter the plug-in installation

How to preview web pages in vscode

2. If the toolbar on the left is not displayed, you can also find Extensions in View to enter the plug-in installation

How to preview web pages in vscode

## 3. Enter Live Server in the search box, find the following in the search results, and choose to install

How to preview web pages in vscode## 4. After the installation is completed, you need to restart the software plug-in to take effect

5. After restarting, create a new workspace (you can also drag a folder directly into vscode), create an HTML file here for testing, be careful to create a separate one Live Server cannot be used by dragging HTML files into the IDE. You need to put this HTML file into the created workspace (folder). After the new creation is completed, we can see a Go Live on the status bar. Click to automatically Open the browser and display

Tip: If there is an HTML project before, drag the project root folder directly to VScode and it will automatically be added to the workspace

How to preview web pages in vscode6. If there is no status bar, you can also right-click on the file and select Open With Live Server

How to preview web pages in vscode7. Next, we only need to modify the code You need ctrl S to save the modified code, and the browser will automatically refresh...

The above is the detailed content of How to preview web pages in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn