talira

Live Preview

Microsoft's VS Code extension that serves your workspace locally and previews web pages in the editor

open sourceMITfree

Microsoft's VS Code extension that hosts a local server for the workspace and previews HTML pages in an embedded browser beside the code (VS Code's integrated browser where it's available) or in an external browser. Pages refresh as you type, on save or not at all, and a Live Preview task keeps a server running and logs its traffic. The external preview can be debugged with VS Code's JavaScript debugger, and files outside a workspace can be previewed too. It's meant for projects without their own dev server, not for React or Angular apps. Its README still says it's under development. MIT licensed. An alternative to Live Server.

Problems it solves

  • preview my HTML page in VS Code and see changes as I type
  • serve a static site locally from VS Code without setting up a server
  • live reload a plain HTML and CSS project while I edit it

Features

  • local server for the workspace
  • embedded preview with history, URL bar and page search
  • live refresh as you type or on save
  • persistent server task with traffic logging
  • external browser preview with debugging through js-debug
  • previews files outside a workspace

Limitations

  • Meant for projects without their own server, not for apps built with React, Angular and the like1
  • Its README says it is still under development1

Alternatives

The same job

These do what Live Preview does.

  1. Live Server A local development server with live reload, started from VS Code
  2. Browsersync Live reload and synchronised browser testing across devices
  3. Five Server A development server with live reload, PHP serving and browser logs in your terminal, with a VS Code extension
  4. Hotwire Spark Live reloading for Hotwire applications

Compare Live Preview with the top 3