In Docker
- Install xdebug in docker
discover_client_hostto be set to false/0client_hostto be set todocker.host.internal, usingextra_hostsashost.docker.internal:host-gateway
In PhpStorm
- Start listening
- PHP > Debug :
ClearBreak at first line in PHP scripts, Debug port = 9000,9003 [checkCan accept external connections] - PHP > Servers : + : Host/Port of docker, map public/index.php of host and server
"SHOULD" work
Date : January, 2023
Setup :
- PhpStorm (latest, as of now)
- Xdebug 3.2
- PHP 8.1
- Laravel 9.x
- Postgres 14.x
- Apache 2.x
- Ubuntu 22.04 LTS [Host OS]
- Docker / Docker-compose 20.10 / 1.29
- Debian [Docker OS] (stable/LTS as of now)