Skip to content

Instantly share code, notes, and snippets.

@loru88
loru88 / php-cli-xdebug-docker-phpstorm.md
Last active November 29, 2023 09:44
Manually debug PHP CLI inside a Docker container using PHPStorm

to debug a PHP cli script running inside a specific Docker container, you need to find out the the Gateway IP of the docker network your container is attached to.

grab the network name of the running container

$ docker inspect my_container | grep NetworkMode

than grab the gateway IP