Skip to content

Commit 532e9fc

Browse files
authored
Update Dockerfile to allow for more Xdebug configs (#9433)
1 parent e8a48cb commit 532e9fc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: dev
3+
Comment: Update the Dockerfile to support more Xdebug config arguments.
4+
5+

docker/wordpress_xdebug/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
FROM wordpress:php8.1
2+
ARG XDEBUG_MODE=coverage,debug
23
ARG XDEBUG_REMOTE_PORT
34
ARG XDEBUG_REMOTE_HOST=host.docker.internal
45
ARG XDEBUG_START_WITH_REQUEST=trigger
6+
ARG XDEBUG_SHOW_ERROR_TRACE=0
7+
ARG XDEBUG_SHOW_EXCEPTION_TRACE=0
58
RUN pecl install xdebug \
6-
&& echo 'xdebug.mode=coverage,debug' >> $PHP_INI_DIR/php.ini \
9+
&& echo "xdebug.mode=${XDEBUG_MODE}" >> $PHP_INI_DIR/php.ini \
710
&& echo "xdebug.client_port=${XDEBUG_REMOTE_PORT}" >> $PHP_INI_DIR/php.ini \
811
&& echo "xdebug.client_host=${XDEBUG_REMOTE_HOST}" >> $PHP_INI_DIR/php.ini \
912
&& echo "xdebug.start_with_request=${XDEBUG_START_WITH_REQUEST}" >> $PHP_INI_DIR/php.ini \
13+
&& echo "xdebug.show_error_trace=${XDEBUG_SHOW_ERROR_TRACE}" >> $PHP_INI_DIR/php.ini \
14+
&& echo "xdebug.show_exception_trace=${XDEBUG_SHOW_EXCEPTION_TRACE}" >> $PHP_INI_DIR/php.ini \
1015
&& docker-php-ext-enable xdebug
1116
RUN apt-get update \
1217
&& apt-get install --assume-yes --quiet --no-install-recommends gnupg2 subversion mariadb-client less jq openssh-client

0 commit comments

Comments
 (0)