English | Türkçe | 简体中文 | Español | Português | Русский | 日本語 | Deutsch | Français | 한국어 | Bahasa Indonesia
OpenLiteSpeed for VS Code
Run your local OpenLiteSpeed sites from VS Code on Windows and macOS. Start and stop the server, create sites, give every site its own PHP version, debug PHP with Xdebug, read the mail your sites send, run queue workers and follow the logs, without leaving the editor.
The extension works with OpenLiteSpeed for Windows and OpenLiteSpeed for macOS. It talks to the openlitespeed program on your computer and sends nothing anywhere else.
Features
- Sites view: every site with its kind (PHP, WordPress, Laravel, Node.js, Python or proxy), PHP version and public address. The site of the open workspace comes first.
- Server view: web server, default PHP, MariaDB, Node.js, Cloudflare Tunnel and live requests per second.
- New site: a PHP site, WordPress, Laravel, a Node.js app or a Python app in the projects folder, opened at
http://name.test/.
- PHP per site: pick the PHP version of a site from the status bar or the Sites view. Install more PHP versions and change the default.
- Xdebug: Debug with Xdebug turns Xdebug on for the PHP of the site, adds a launch configuration and starts listening. Set a breakpoint and open the page. Needs the PHP Debug extension, which the command offers to install.
- Mail catcher: every mail your sites send stays on your computer and shows up in the Mail view, with the HTML and text parts and the attachments. PHP
mail() works without settings; apps that use SMTP send to 127.0.0.1 port 1025.
- Background jobs: run
php artisan queue:work, php artisan schedule:work, npm run dev or any command next to a site. The server starts them, restarts them when they stop and you follow their output.
- Node.js per site: pick the Node.js version of a site, or let its
.nvmrc pick it.
- Logs: follow the error log, the access log, MariaDB, app and tunnel logs live in the Output panel.
- Terminal: an OpenLiteSpeed terminal profile with the default PHP, Composer, Node.js and the MariaDB client on the
PATH.
- Databases: start MariaDB, create a database with its own user and copy the password or ready
.env lines, open phpMyAdmin.
- Put a site online: share a local site at a public
https://*.trycloudflare.com address and take it offline again.
- Status bar: the server state, and the PHP version of the site you are editing.
Requirements
- OpenLiteSpeed for Windows 1.9.4-win.12 or newer, or OpenLiteSpeed for macOS 1.9.4-mac.2 or newer. Earlier versions work too, without Xdebug, the mail catcher, background jobs and the Node.js version per site.
- VS Code 1.90 or newer.
The extension finds OpenLiteSpeed in the setup folder, Scoop and the PATH on Windows and in ~/Library/OpenLiteSpeed on macOS. A copy in C:\OpenLiteSpeed, Laragon, XAMPP or on another drive is used after you confirm it once. For another folder, run OpenLiteSpeed: Choose the OpenLiteSpeed Program.
Settings
| Setting |
Default |
Description |
openlitespeed.path |
empty |
Full path of the openlitespeed program. Empty finds it automatically. |
openlitespeed.refreshInterval |
5 |
Seconds between refreshes while VS Code is focused. 0 refreshes only after an action. |
openlitespeed.statusBar |
true |
Show the server state and the PHP version of the current site in the status bar. |
Commands
All commands are under OpenLiteSpeed in the Command Palette: Start Server, Stop Server, Restart Server, New Site, Open in Browser, Open Folder in New Window, Add Folder to Workspace, Change PHP Version, Change Default PHP Version, Install PHP Version, Debug with Xdebug, Turn Off Xdebug, Turn On the Mail Catcher, SMTP Settings, Add Background Job, Change Node.js Version, Show Log, Show App Log, Open Terminal, Put Online, Take Offline, Copy Public Address, Start MariaDB, Stop MariaDB, Create Database, Open phpMyAdmin, Open WebAdmin and Open Dashboard.
License
MIT, see LICENSE. This extension is not affiliated with or endorsed by LiteSpeed Technologies, Microsoft, Cloudflare or the Xdebug project. LiteSpeed and OpenLiteSpeed are trademarks of LiteSpeed Technologies, Inc.
| |