Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Preview in browserNew to Visual Studio Code? Get it now.
Preview in browser

Preview in browser

Massimo Cassandro

|
6,395 installs
| (1) | Free
Open a file in specified browser using local web server if possibile
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Preview in Browser

VS code extension to preview a file in browser, using local web server if defined (otherwise, file:// protocol is used).

Web Server domain can be set in workspace setting.

Furthermore, a specific browser can be set for previews (default: Firefox Developer Edition).

Preview in Browser uses opn to launch the browser app.

Browser name is platform dependant as reported in opn readme:

The app name is platform dependent. Don't hard code it in reusable modules. Eg. Chrome is google chrome on OS X, google-chrome on Linux and chrome on Windows.

From 1.1 version a string to be removed from the beginning of local path can be defined in the extension settings.

This extension was inspired by vscode-extensions-open-in-browser and by vscode-local-web-opener

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft