Home >Development Tools >VSCode >How to open vscode code from browser

How to open vscode code from browser

hzc
hzcOriginal
2020-06-06 15:29:2110861browse

How to open vscode code from browser

Vscode method to open the code from the browser:

open in browser

Search for the "view in browser" plug-in in the vscode extension and click to install it. Click the explorer to select the current file, right-click and select "View In Browser" to open the page in the default browser.

How to open vscode code from browser
Real-time refresh method one: livereload

In the project Run the command in the directory:

browser-sync start --server --files "**/*.css,**/*.html,**/*.js"

Method:

  • Select "Integrated Terminal" in "View" and enter the above command on the command line

How to open vscode code from browser

  • Right-click the local file and select "Open in Terminal", enter the command

## in the terminal command line

How to open vscode code from browser

#The above two methods have the same effect and principle. They can both run in the background. Press the shortcut key "control c" to exit the current running process.

Implement refresh method two:

Install the Live HTML Previewer plug-in and click Preview Available in the lower left corner of the page.


Note: With livereload, you don’t need to install the “view in browser” plug-in.

Recommended tutorial: "

vscode Getting Started Tutorial"

The above is the detailed content of How to open vscode code from browser. 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