
this path works with the volume already set up in docker-compose where we mount the /logs/xdebug folder.įor all options and settings available checkout the official documentation. Let's start with xdebug.ini zend_extension = xdebug.so ini file with the configuration that we want, and to adjust our php service container to load that file. Therefore, I have a very simple Dockerfile with these lines: FROM php:7.4-fpmĪnd my docker-compose file will have something along these lines: php: It's built on a PHP-FPM image with a couple of instructions added.

VSCode is configured to connect to xDebug.įirst things first - install xDebug in your docker container.Check that xDebug is installed and loaded in your PHP container.Here's what we need to take into consideration: use xDebug 3 which introduced breaking changes.maybe use a container for nginx and another one for php-fpm.you have docker installed and docker-compose.you are using VSCode (Visual Studio Code).


I wouldn't have thought that I needed to write a post such as this but I found many different resources online that were outdated, presented strange/unnecessary/insecure solutions and so on.
