XDebug, PHPStorm & Docker
Hello,
I realise there are numerous posts on this already but I cannot seem to get Xdebug working with PHPStorm in a Docker container, even having read multiple tutorials it has been of little help.
Some background information is this is a Drupal 8 project running in a docker container with docker compose with PHP 7.2 and the host OS is MacOSX
When I go to Run > Edit Configuration and click the "Validate debugger configuration on the web server" link the new window that appears shows ticks next to every item so I assume Xdebug is installed and working correctly on the Docker container. I'm using the Xdebug Chrome helper extension as well.
Any help would be greatly appreciated as no matter how many times people say it's "no config" or how many tutorials are written I just cannot get Xdebug to work.
To access my Docker site via a browser I go to http://localhost:8888/web


请先登录再写评论。
We need to see your xdebug section of a php.ini: please check it running <?php phpinfo(); page on a web server.
What are your volume mappings in docker-compose file?
Sorry I thought I'd already replied to this. I managed to get this working using xdebug.remote_host=docker.for.mac.localhost in my Dockerfile which from what I understand isn't ideal as it would only work with a Mac.
Here is my docker-compose file, I tried various volume mappings but without success. XDebug must be running as with the line mentioned above it works fine.