How to Open HTML Files in Google Chrome from Visual Studio Code

See HTML: Tips and Tricks for similar articles.
Looking to improve your HTML skills? Check out Webucator’s HTML classes.

Visual Studio Code doesn't have a built-in method for launching HTML and other files in Google Chrome, but you can configure it to do so.

Get the open in browser Extension

The free open in browser extension works well. After installing it, restart Visual Studio Code and then right-click on any HTML page. You will have options to open in your default browser or choose another browser.Open in Browser from VS Code

Note that there is a bug in Open in Browser for Version 1.29.1 of Visual Studio Code (and likely other versions as well) that prevents the right-click context menu items from showing up. However, the shortcut key (Alt+B) still works.

See this bug report for details.

If you have trouble getting Open in Browser working, you might give the Open PHP/HTML/JS In Browser extension a try.


Related Articles

  1. How to Properly Nest Lists in HTML
  2. How to Open HTML Files in Google Chrome from Visual Studio Code (this article)
  3. How to Create a Simple HTML Document
  4. How to Work with Empty and Container Tags in HTML
  5. How to Mark Up a Citation in HTML
  6. How to Create an HTML Table
  7. How to Force a Refresh of favicon.ico