In VSCode:
- Install extension:
xdebug.php-debug
- Goto settings, update PHP › Debug: Ide Key:
"php.debug.ideKey": "vsc"
If host.internal.docker
not working, change xdebug.client_host
by your IP address:
- macOS:
ipconfig getifaddr en0
- Windows with WSL:
grep nameserver /etc/resolv.conf | cut -d ' ' -f2
- Linux (Debian based distros):
hostname -I | cut -d ' ' -f1
Use XDebug Wizard to get exact installation instructions, then update copy location in Dockerfile
.