docs
docs copied to clipboard
Update params from xdebug v3. Add instruction setting PHPStorm
Edit xdebug config, update params from xdebug v3(https://xdebug.org/docs/upgrade_guide). Add instruction setting PphShtorm"
It is also great to be able to debug tests, I will just copy how-to information from our README file (we are using api-platform/api-platform distribution), feel free to add it anywhere you want:
Debugging tests
In order to debug tests, first you need to get client host IP from Docker:
docker container ls
# find id of `php` you container (left column), then run
docker inspect --format='{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' eccdb7ddae49
# where eccdb7ddae49 is your php container id
then, pass returned IP to the following command inside container (docker-compose exec PHP sh):
php -dxdebug.client_host=172.21.0.1 -dxdebug.start_with_request=yes vendor/bin/phpunit
# where 172.21.0.1 is the IP returned from the previous command