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
- Confirm the extension is installed and enabled for this window.
- Open a folder (File → Open Folder), not a single loose file from Downloads with no workspace.
- Right-click an .html file → Open with Live Server, or click Go Live in the status bar.
- Check whether a browser tab opened behind other windows.
- 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
More guides
- Install the VS Code `code` command (PATH) on Windows, macOS, and Linux
- How to choose a Dev Setup preset (frontend, Node, full-stack, Python)
- Run the Dev Setup install script safely in VS Code’s terminal
- Common Dev Setup errors and how to fix them
- Fix “node is not recognized” and npm install problems on Windows, macOS, and Linux
- Python and venv first steps after installing VS Code
- When VS Code extensions fail to install (Marketplace, script, or UI)
- Using WSL with VS Code without mixing Windows and Linux paths
- Your first week after Dev Setup: a practical checklist