Recall the path settings from the *Assumption* section and adjust if your configuration differs!
..important::
The above example configures Xdebug for a single project **mytest**. Add more projects as you need.
..seealso::
* https://go.microsoft.com/fwlink/?linkid=830387
* https://github.com/cytopia/devilbox/issues/381
Configure php.ini
-----------------
..note:: The following example show how to configure PHP Xdebug for PHP 5.6:
Create an ``xdebug.ini`` file (must end by ``.ini``):
..code-block:: bash
# Navigate to the Devilbox git directory
host> cd path/to/devilbox
# Navigate to PHP 5.6 ini configuration directory
host> cd cfg/php-ini-5.6/
# Create and open debug.ini file
host> vi xdebug.ini
Copy/paste all of the following lines into the above created ``xdebug.ini`` file:
..code-block:: ini
:caption:xdebug.ini
:emphasize-lines:7,8,11
; Defaults
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_port=9000
; The Windows way
xdebug.remote_connect_back=0
xdebug.remote_host=192.168.246.1
; idekey value is specific to Visual Studio Code
xdebug.idekey=VSCODE
; Optional: Set to true to always auto-start xdebug
xdebug.remote_autostart=false
..important:: Ensure you have retrieved the correct ``DockerNAT`` IP address as stated in the prerequisites section above!
..note:: Host os and editor specific settings are highlighted in yellow and are worth googling to get a better understanding of the tools you use and to be more efficient at troubleshooting.
Restart the Devilbox
--------------------
Restarting the Devilbox is important in order for it to read the new PHP settings.
Note that the following example only starts up PHP, HTTPD and Bind.
..code-block:: bash
# Navigate to the Devilbox git directory
host> cd path/to/devilbox
# Stop, remove stopped container and start
host> docker-compose stop
host> docker-compose rm
host> docker-compose up php httpd bind
..seealso:::ref:`start_the_devilbox_stop_and_restart` (Why do ``docker-compose rm``?)