In Docker
- Install xdebug in docker
discover_client_host
to be set to false/0client_host
to be set todocker.host.internal
, usingextra_hosts
ashost.docker.internal:host-gateway
In PhpStorm
- Start listening
- PHP > Debug :
Clear
Break at first line in PHP scripts, Debug port = 9000,9003 [check
Can 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)