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 the code written in VSCode
1. Create a new HTML file
2. Click Extensions on the left to open the extension bar
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.
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).
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.
## Recommended related article tutorials:
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!