Skip to content

Instantly share code, notes, and snippets.

@vralle
Last active November 13, 2022 09:03
Show Gist options
  • Save vralle/e431d46b59a152723609d46105854b67 to your computer and use it in GitHub Desktop.
Save vralle/e431d46b59a152723609d46105854b67 to your computer and use it in GitHub Desktop.
Install xdebug 3 in Docker container
# https://matthewsetter.com/setup-step-debugging-php-xdebug3-docker/
# ENV XDEBUG_PORT 9000
# ENV XDEBUG_IDEKEY docker
RUN set eux; \
pecl install "xdebug"; \
docker-php-ext-enable xdebug; \
rm -r /tmp/pear; \
{ \
echo "xdebug.mode=debug"; \
echo "xdebug.start_with_request=yes"; \
echo "xdebug.client_host=host.docker.internal"; \
echo "xdebug.client_port=${XDEBUG_PORT}"; \
echo "xdebug.idekey=${XDEBUG_IDEKEY}"; \
echo "xdebug.log=/tmp/xdebug.log"; \
} > $PHP_INI_DIR/conf.d/xdebug.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment