- Install WSL
- Install your preferred WSL Linux Distro vom Microsoft Store. In my case I used Ubuntu 20.04.
- Install Docker for Windows
- Enable Docker WSL2 Integration
- Install Lando inside WSL
wget https://github.com/lando/lando/releases/download/v3.6.0/lando-x64-v3.6.0.deb
dpkg -i --ignore-depends=docker-ce lando-x64-v3.6.0.deb
- Remove docker-ce dependency from Lando in
/var/lib/dpkg/status
. Otherwise you would have problems install other packages viaapt
sudo nano /var/lib/dpkg/status
- Configure Lando for XDebug in your WSL.
- Create a file named
.lando.local.yml
in your project root folder (Same location as.lando.yml
) with the content below. Also add.lando.local.yml
to your.gitignore
. See Landofile Documentation for more information.
.lando.local.yml
:
services:
appserver:
overrides:
environment:
XDEBUG_CONFIG: "discover_client_host=0 client_host=host.docker.internal"
- (PHPStorm & IntelliJ only) Add a "PHP Web Page" "Run/Debug Configuration" and set up your path mappings correctly (Normally map your project root folder to path "/app" on the server)
- (Visual Studio Code only) Launch configuration (Replace the hostname value with your .lndo.site URL hostname)
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"hostname": "yoursite.lndo.site",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/app": "${workspaceRoot}",
},
"log": true,
}
}
- Enjoy high performance disk I/O and XDebug working with Windows, Lando, Docker and WSL2!
It works! Thank you so much!