Home > Development Tools > VSCode > How to run front-end code on vscode

How to run front-end code on vscode

Release: 2020-01-10 14:04:29
Original
7325 people have browsed it

How to run front-end code on vscode

Generally, after installing VsCode, we need to install many plug-ins to make vscode support related functions. Let’s take a look at how vscode runs the front-end code.

vscode can install a static web server. Live Server is used to run front-end code for easy debugging. The latest Live Server already supports php dynamic pages.

The installation method is to click the fifth icon on the left to open the "Extensions" page, enter Live Server in the text box, click on the first search result, click Install on the right page, and wait for the installation to complete .

The operation method is to select the project and click the Go live button in the toolbar at the bottom of the screen. Click once again to stop the server.

Live Server has some default configuration options that users can modify. Click File->Preferences->Settings and find Live Server Config on the right page, which lists the configuration properties of this plug-in. Copy it to the right, modify the attribute values, and click Save.

For example, to modify the default port, you can copy the following code to the user settings on the right side of the page:

"liveServer.settings.port": 5501
Copy after login

Recommended related article tutorials: vscode tutorial

The above is the detailed content of How to run front-end code on vscode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template