Dev Setup

Live Server not opening pages: checklist for VS Code beginners

Fix Live Server when the browser does not open, ports are busy, or you are using Vite/Next and do not need Live Server at all.

Live Server (and similar preview extensions) serve static HTML/CSS/JS from a local folder and reload the browser when files change. Beginners love it for first websites. Frameworks with their own npm run dev often make Live Server unnecessary—and mixing both confuses ports. Use this checklist when “Go Live” does nothing, opens a blank page, or conflicts with another tool.

Do you need Live Server?

  • Yes: plain HTML files, simple CSS/JS, learning the browser without a bundler.
  • Usually no: Vite, Next.js, Nuxt, Create React App, Astro, and similar—use the project’s npm run dev (or equivalent) instead.
  • In Dev Setup: uncheck Live Server on the extensions step if you already know you will use a framework CLI.

Go Live does nothing

  1. Confirm the extension is installed and enabled for this window.
  2. Open a folder (File → Open Folder), not a single loose file from Downloads with no workspace.
  3. Right-click an .html file → Open with Live Server, or click Go Live in the status bar.
  4. Check whether a browser tab opened behind other windows.
  5. Try a different default browser in the extension settings if your corporate browser blocks localhost.

Port already in use

If port 5500 (or your configured port) is taken, Live Server fails or attaches to the wrong process. Close other Live Server sessions, stop leftover node processes from previous projects, or change liveServer.settings.port in settings. Avoid running two preview tools on the same port.

Blank page or wrong folder

Live Server serves relative to the workspace root. If index.html lives in a subfolder, open that file specifically or adjust the root. Broken CSS paths usually mean the HTML uses absolute paths that do not match the served hierarchy—switch to relative paths while learning.

Security and file:// links

Opening HTML via file:// skips a real HTTP server and breaks some APIs and module scripts. Prefer Live Server or a framework dev server over double-clicking the file in Explorer. More setup help lives in the Guides section of this site; feedback: https://github.com/smartopslab128-ctrl/gif-image-paste/issues