Home  >  Article  >  Development Tools  >  How to use a browser to view code written in VSCode

How to use a browser to view code written in VSCode

angryTom
angryTomOriginal
2020-02-10 14:46:286527browse

Vscode defaults to viewing html files under the console, which is very inconvenient for us to view and debug. So how to open it in the browser?

How to use a browser to view code written in VSCode

How to use a browser to view the code written in VSCode

1. Create a new HTML file

How to use a browser to view code written in VSCode

2. Click Extensions on the left to open the extension bar

How to use a browser to view code written in VSCode

3. Enter open in browser in the search bar of the extension bar, find the open in browser plug-in, and click "Install" in the lower right corner to install it.

How to use a browser to view code written in VSCode

4. Go back to the HTML file you just created, right-click on the file, and select Use in the pop-up window. It opens in the default browser or other browsers, or you can use the shortcut keys we mentioned above (Alt B or Shift Alt B).

How to use a browser to view code written in VSCode

6. If you want to open it in other browsers, select Open In Other Browsers (Shift Alt B, a command box will appear at the top, in which The browsers that can be used will be displayed. Just select the browser you need. Here, we use chrome to open it.

How to use a browser to view code written in VSCode

How to use a browser to view code written in VSCode

## Recommended related article tutorials:

vscode tutorial

The above is the detailed content of How to use a browser to view code written 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