
Then you just have the reverse proxy route on the xdebug flag/cookie.ĭocker compose - something like this: version: "3. I solved it by running two webservers behind a reverse proxy, one with XDebug enabled and one without. Is there an easier way to achieve what I am trying to achieve? Is there some kind of trigger I am missing, or is this simply how XDebug works? Xdebug is configured for step by step debugging and profiling Profile php code with SPX or Xdebug quick start download docker-compose.yml to use php 8.1, 8.0 or 7.4, select the image in docker-compose. I would expect XDebug to degrade performance (or at least noticeably) only when actually debugging. The "problem" with this is that I want to be able to start debugging quickly whenever I need to, instead of stopping my containers, changing the value of PHP_XDEBUG_MODE, start the containers, do this whole process again as soon as I'm done debugging. If I change "debug" to "off", performance increases greatly. Today I found out that due to those lines certain pages load really really slow, even though I am not debugging at the moment. To enable the XDebug feature I need to add the following lines to my docker-compose.yml: PHP_XDEBUG: 1 $/docker/apache/conf.d:/usr/local/etc/php/conf.d is xdebug related meaning is the one enabling and setting up the extension.I am experimenting with performance issues in a PHP project on my development environment and found out that it all comes down to XDebug. Image: local-dev:1.6 # increase this number when changing the Dockerfile & chown -R file that uses the previous Dockerfile to build the containers (not all the time though): version: "2.4" & mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \ & docker-php-ext-install zip pdo_mysql bcmath \

RUN apt-get update & apt-get install -y \ I have the following Dockerfile: FROM php:7.2-apache
