Skip to content

Commit

Permalink
readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
go-faustino committed Dec 21, 2017
1 parent a60c367 commit 7662051
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,22 @@ Xdebug

This repo includes a Dockerfile, to run Xdebug in a container. You can find it on Github: https://github.com/go-faustino/Xdebug and Docker Hub: https://hub.docker.com/r/gofaustino/xdebug/

To change Xdebug parameters, clone the Github repo, edit ext-xdebug.ini, and build the image again, using the following command (the final dot must be kept):
To run the container, use the following run command as a guideline. This includes a volume for external configuration of the installed extensions, including Xdebug, which allows changing the settings on the fly and persisting them, if you don't need it just remove that -v parameter:

docker build -t user/xdebug .

To run the container, use the following run command as a guideline:

docker run -d --name some-xdebug -p 80:80 -v /local_path_where_your_php_app_is_located:/var/www/html --link some-mysql:mysql user/xdebug

Guidelines to edit ext-xdebug.ini
---------------------------------

xdebug.remote_autostart = 0
you have to activate debugging, either with a browser extension, or appending ?XDEBUG_SESSION_START=1 to the url
docker run -d --name some-xdebug -p 80:80 -v /host_php_app_path:/var/www/html -v ~/host_path_for_config_files:/usr/local/etc/php/conf.d --link mysql:mysql gofaustino/xdebug

xdebug.remote_autostart = 1
debugging starts immediately

xdebug.remote_connect_back = 0
you have to declare the remote_host parameter, with the remote host ip address

xdebug.remote_connect_back = 1
xdebug detects the caller ip address. When called in a container, xdebug will detect this as the local ip address (eg: 172.17.0.1), and it should connect to the ip address on the network (eg: 192.168.1.45), so this probably won't work

xdebug.remote_host
if remote_connect_back = 0, this must be included. Find your network ip address (ifconfig en0), and use it here
Guidelines for editing ext-xdebug.ini
-------------------------------------

* xdebug.remote_autostart
* xdebug.remote_autostart = 0
* you have to activate debugging, either with a browser extension, or appending ?XDEBUG_SESSION_START=1 to the url in your browser
* xdebug.remote_autostart = 1
* debugging starts immediately
* xdebug.remote_connect_back
* xdebug.remote_connect_back = 0
* On your debugging tool, you need to setup the remote host ip address
* xdebug.remote_connect_back = 1
* xdebug detects the caller ip address. When called in a container, xdebug will detect this as the local ip address (eg: 172.17.0.1), and it should connect to the ip address on the network (eg: 192.168.1.x), so this probably won't work
* xdebug.remote_host
* if remote_connect_back = 0, this must be included. Find your network ip address (ifconfig en0), and use it here

0 comments on commit 7662051

Please sign in to comment.