工作区没有 .html/.htm 文件时需用命令面板或快捷键启动;动态页面(如 PHP)需另装 Live Server Web Extension;默认端口被占用时会回退到随机端口
vscode-live-server
ritwickdeyMIT更新放缓VS Code 插件,一键为静态或动态页面启动本地开发服务器,改完代码浏览器自动刷新,省去手动重启的麻烦。
Launch a development local Server with live reload feature for static & dynamic pages.
ctrl+P 后输入:ext install ritwickdey.liveserverREADME 未说明,作为 VS Code 扩展在本地运行,无 GPU 或显存要求
VS Code 扩展,为静态和动态页面启动带实时重载的本地开发服务器
VS Code 插件,一键为静态或动态页面启动本地开发服务器,改完代码浏览器自动刷新,省去手动重启的麻烦。
核心能力
- 在状态栏一键启停本地开发服务器
- 保存文件后浏览器自动实时刷新
- 可自定义端口、服务器根目录和默认浏览器
- 支持 https、代理、CORS 与多根工作区
- 通过 WLAN 让手机等设备远程访问
容易踩的坑
- 5.7.10最新正式版2026-02-27 · 2026-02-27 09:30 UTC
New: 2 new settings "liveServer.settings.headers" and "liveServer.settings.cors" settings
Patches: CVE-2025-65717
- v5.7.92022-08-31 · 2022-08-31 02:57 UTC
查看更新说明
03722ff Pin es5-ext to 0.10.53. https://github.com/ritwickdey/vscode-live-server/issues/2567
- v5.7.82022-08-30 · 2022-08-30 07:40 UTC
查看更新说明
71bc737 Lazy load external libraries
- activation time is now 3ms in MacOS M1 🎉
- v5.7.72022-08-30 · 2022-08-30 06:45 UTC
查看更新说明
dfc8332 fix: require ip get call
- v5.7.62022-08-30 · 2022-08-30 06:25 UTC
查看更新说明
2c237d1 fix: tag push in release yml b8daa1b change release default value 6784a6a fix release workflow 4815ade added host with error message e938eb7 removed useBrowserPreview settings 3d58e75 import -> require f8b4cbc fix typo and rearrange words in
src/appModel.ts(#2465) 8202218 fix: some missspellings :) (#2431) ac31be3 run tests for changes on master branch (#2444) 1730f6b Fixing HTML validator warning (#1692) 6d2dfe5 Adding e2e test coverage (#2400)
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
[Wanna try LIVE SERVER++ (BETA) ? It'll enable live changes without saving file. https://github.com/ritwickdey/vscode-live-server-plus-plus ]
Live Server
Live Server loves 💘 your multi-root workspace
Live Server for server side pages like PHP. Check Here
[For 'command not found error' #78]
Launch a local development server with live reload feature for static & dynamic pages.

Shortcuts to Start/Stop Server
[NOTE: In case if you don't have any .html or .htm file in your workspace then you have to follow method no 4 & 5 to start server.]
-
Open a project and click to
Go Livefrom the status bar to turn the server on/off.
-
Right click on a
HTMLfile from Explorer Window and click onOpen with Live Server.
. -
Open a HTML file and right-click on the editor and click on
Open with Live Server.
-
Hit
(alt+L, alt+O)to Open the Server and(alt+L, alt+C)to Stop the server (You can change the shortcut form keybinding). [On MAC,cmd+L, cmd+Oandcmd+L, cmd+C] -
Open the Command Pallete by pressing
F1orctrl+shift+Pand typeLive Server: Open With Live Serverto start a server or typeLive Server: Stop Live Serverto stop a server.
Features
- A Quick Development Live Server with live browser reload.
- Start or Stop server by a single click from status bar.
- Open a HTML file to browser from Explorer menu.[Quick Gif Demo].
- Support for excluding files for change detection.
- Hot Key control.
- Customizable Port Number, Server Root, default browser.
- Support for any browser (Eg: Firefox Nightly) using advance Command Line.
- Support for Chrome Debugging Attachment (More Info). [Quick Gif Demo].
- Remote Connect through WLAN (E.g.: Connect with mobile) [Need Help? See FAQ Section]
- Use preferable host name (localhost or 127.0.0.1).
- Customizable Supporting Tag for Live Reload feature. (Default is
Bodyorhead) - SVG Support
httpsSupport.- Support for proxy.
- CORS Enabled (disabled by default)
- Multi-root workspace supported.
- Support for any file even dynamic pages through Live Server Web Extension.
Installation
Open VSCode and type ctrl+P, type ext install ritwickdey.liveserver.
Settings
All settings are now listed here Settings Docs.
FAQs
All FAQs are now listed here FAQ Docs
What's new ?
-
Version 5.6.1 (17.04.19)
- Fixed
Extension host terminated unexpectedly[#431]
- Fixed
-
Version 5.6.0 (17.04.19)
- [NEW] Intregation of
Browser PreviewwithLive Server[#352 - Thanks to Kenneth Auchenberg] - [NEW] Fallback to random port If given port is busy. [#330 - Thanks to Ali Almohaya ]
- [FIXES] Moved to
vscode-chokidarlib for #285. - Doc Fixes [#388 - Thanks to Ted Silbernagel]
- [NEW] Intregation of
-
Version 5.5.1 (12.02.19)
- [Fixes] Fixed
Extension host terminated unexpectedlyfor MacOS. [#285]
- [Fixes] Fixed
-
Version 5.5.0 (12.02.19)
Changelog
To check full changelog click here.
Special Thanks To Maintainers
A special thanks to Max Schmitt, Joydip Roy & Ayo Adesugba for contributing their valueable time on this project.
LICENSE
This extension is licensed under the MIT License