This is a trashpost mostly used to store all the links I had in my tab. There might me incomplete, missing or conflicting information below so take this with a grain of salt. Whatever you Dockerfile contents are, add these somewhere sensible, before EXPOSE or COPY usually: RUN apk add --no-cache $PHPIZE_DEPS linux-headers && \ pecl install xdebug && docker-php-ext-enable xdebug docker-compose.yml
Using off-the-shelf vscode for an occasional debug is currently enough: {"version": "0.2.0", "configurations": [{ "name": "Listen for Xdebug", "type": "php", "request": "launch", "port": 9003, "pathMappings": {"/var/www/": "${workspaceFolder}"} }] }