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

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.

Author: Nat Dunn

Nat Dunn is the founder of Webucator (, a company that has provided training for tens of thousands of students from thousands of organizations. Nat started the company in 2003 to combine his passion for technical training with his business expertise, and to help companies benefit from both. His previous experience was in sales, business and technical training, and management. Nat has an MBA from Harvard Business School and a BA in International Relations from Pomona College.

Follow Nat on Twitter at @natdunn and Webucator at @webucator.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.