You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43Lines changed: 43 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,49 @@ You can change the configuration of the docker images by setting various environ
136
136
|`MOODLE_DOCKER_SELENIUM_VNC_PORT`| no | any integer value (or bind_ip:integer)| not set | If set, the selenium node will expose a vnc session on the port specified. Similar to MOODLE_DOCKER_WEB_PORT, you can optionally define the host IP to bind to. If you just set the port, VNC binds to 127.0.0.1 |
137
137
|`MOODLE_APP_VERSION`| no | next, latest, or an app version number| not set | If set will start an instance of the Mmodle app if the chrome browser is selected |
138
138
139
+
## Using XDebug for live debugging
140
+
141
+
The XDebug PHP Extension is not included in this setup and there are reasons not to include it by default.
142
+
143
+
However, if you want to work with XDebug, especially for live debugging, you can add XDebug to a running webserver container easily:
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.
168
+
169
+
After these commands, XDebug ist enabled and ready to be used in the webserver container.
170
+
If you want to disable and re-enable XDebug during the lifetime of the webserver container, you can achieve this with these additional commands:
171
+
172
+
```
173
+
# Disable XDebug extension in Apache and restart the webserver container
174
+
moodle-docker-compose exec webserver sed -i 's/^zend_extension=/; zend_extension=/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
175
+
moodle-docker-compose restart webserver
176
+
177
+
# Enable XDebug extension in Apache and restart the webserver container
178
+
moodle-docker-compose exec webserver sed -i 's/^; zend_extension=/zend_extension=/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
179
+
moodle-docker-compose restart webserver
180
+
```
181
+
139
182
## Advanced usage
140
183
141
184
As can be seen in [bin/moodle-docker-compose](https://github.com/moodlehq/moodle-docker/blob/master/bin/moodle-docker-compose),
0 commit comments