talira

open in browser

Open the current file from VS Code in your browser or its default app

open sourceMITfree

A VS Code extension that opens a saved file in the default browser or another browser you pick (Alt+B, Shift+Alt+B, the Command Palette or a context menu), or in whatever application the operating system associates with it, so JSON, Markdown or PSD files open in their own apps. You can add custom browsers with their own arguments (Chrome's --incognito). Serve Mode starts a small HTTP server for local static files and opens the page at a localhost URL, for pages that need HTTP or relative assets; it reuses one server per root and only runs in trusted local workspaces. MIT licensed.

Problems it solves

  • open the HTML file I am editing in VS Code in Chrome
  • preview a static page over localhost from VS Code
  • open a file in a different browser from VS Code

Features

  • Open In Default Browser and Open In Other Browsers commands with shortcuts
  • opens non-HTML files in their associated applications
  • custom browsers with per-browser arguments
  • Serve Mode: a local HTTP server for static pages
  • context menu entries in the Explorer, editor and editor tabs

Limitations

  • Files must be saved to disk first12
  • Serve Mode is unavailable in remote and untrusted workspaces12
  • Open VSX carries only an old 2.0.0 build from 2022, published by someone other than the maker12

Alternatives

The same job

These do what open in browser does.

  1. code-server VS Code in the browser
  2. Office Viewer Opens Excel, Word, PowerPoint, PDF and other files inside VS Code, with a WYSIWYG Markdown editor
  3. Markdown Preview Enhanced A Markdown preview for VS Code with scroll sync, diagrams, math, code chunks and export to PDF, HTML and ebooks
  4. Edit CSV Edit CSV files in a spreadsheet-like table inside VS Code
  5. PDF Viewer A lightweight PDF viewer for VS Code built on the latest Mozilla PDF.js
  6. Jinja for Visual Studio Code Syntax highlighting and snippets for the Jinja template language in VS Code

Compare open in browser with the top 3