Skip to content

Commit 0183491

Browse files
author
Adrian Perez
authored
Update README.md due Xdebug 2 to 3 upgrade
https://xdebug.org/docs/upgrade_guide
1 parent ddaf009 commit 0183491

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,17 @@ moodle-docker-compose exec webserver pecl install xdebug
215215
# Set some wise setting for live debugging - change this as needed
216216
read -r -d '' conf <<'EOF'
217217
; Settings for Xdebug Docker configuration
218-
xdebug.coverage_enable = 0
219-
xdebug.default_enable = 0
220-
xdebug.cli_color = 2
221-
xdebug.file_link_format = phpstorm://open?%f:%l
222-
xdebug.idekey = PHPSTORM
223-
xdebug.remote_enable = 1
224-
xdebug.remote_autostart = 1
225-
xdebug.remote_host = host.docker.internal
218+
xdebug.mode = debug
219+
xdebug.client_host = host.docker.internal
226220
EOF
227221
moodle-docker-compose exec webserver bash -c "echo '$conf' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
228222
229-
# Enable XDebug extension in Apache
223+
# Enable XDebug extension in Apache and restart the webserver container
230224
moodle-docker-compose exec webserver docker-php-ext-enable xdebug
225+
moodle-docker-compose restart webserver
231226
```
232227

233-
While setting these XDebug settings depending on your local need, please take special care of the value of `xdebug.remote_host` which is needed to connect from the container to the host. The given value `host.docker.internal` is a special DNS name for this purpose within Docker for Windows and Docker for Mac. If you are running on another Docker environment, you might want to try the value `localhost` instead or even set the hostname/IP of the host directly.
228+
While setting these XDebug settings depending on your local need, please take special care of the value of `xdebug.client_host` which is needed to connect from the container to the host. The given value `host.docker.internal` is a special DNS name for this purpose within Docker for Windows and Docker for Mac. If you are running on another Docker environment, you might want to try the value `localhost` instead or even set the hostname/IP of the host directly.
234229

235230
After these commands, XDebug ist enabled and ready to be used in the webserver container.
236231
If you want to disable and re-enable XDebug during the lifetime of the webserver container, you can achieve this with these additional commands:

0 commit comments

Comments
 (0)