Fixes #381 Rewrite and simplify Xdebug documentation

This commit is contained in:
cytopia
2019-03-02 17:57:21 +01:00
parent 771b01aec0
commit cd60aa7568
26 changed files with 2624 additions and 898 deletions

View File

@ -27,75 +27,82 @@ how they connect back to the host.
Most IDE or editors will also require different configurations for how they talk to PHP Xdebug.
This is at least most likely the case for ``xdebug.idekey``.
.. seealso:: :ref:`configure_php_xdebug_options`
Configure PHP container for Xdebug
==================================
Configure Xdebug
================
Docker on Linux
---------------
Docker on Linux allows Xdebug to automatically connect back to the host system without the need
of an explicit IP address.
.. toctree::
:glob:
:maxdepth: 1
:hidden:
/intermediate/configure-php-xdebug/php-xdebug-options
/intermediate/configure-php-xdebug/xdebug-*
The following gives you a step-by-step guide on how to setup PHP Xdebug for the Devilbox depending
on what host operating system you are using.
Be reminded that PHP configuration is always done per version, i.e. having it configured for
PHP 7.2, does not enable it for any other versions.
/intermediate/configure-php-xdebug/linux/*
.. seealso::
* :ref:`configure_php_xdebug_options`
* :ref:`configure_php_xdebug_lin`
* :ref:`configure_php_xdebug_mac`
* :ref:`configure_php_xdebug_win`
* :ref:`configure_php_xdebug_docker_toolbox` (Mac or Windows)
* :ref:`configure_php_xdebug_lin_atom`
* :ref:`configure_php_xdebug_lin_phpstorm`
* :ref:`configure_php_xdebug_lin_sublime`
* :ref:`configure_php_xdebug_lin_vscode`
Configure your IDE/editor for Xdebug
====================================
After you have setup PHP Xdebug as referenced above, you can continue to configure your currently
used IDE/editor.
Most IDE/editors will usually be configured in a very similar way, which comes down to two main
settings;
Path mapping
------------
The path mapping is a mapping between the file path on your host operating system and the one
inside the PHP Docker container.
The path on your host operating system is the one you have set in :ref:`env_httpd_datadir`.
In case you have set a relative path in ``.env``, ensure to retrieve the absolute path of it when
setting up your IDE config.
The path inside the PHP Docker container is always ``/shared/httpd``.
.. important::
Even though your path in ``.env`` for :ref:`env_httpd_datadir` might be relative (e.g. ``./data/www``),
you need to get the actualy absolute path of it, when setting up your IDE.
IDE key
-------
This is the value you have set in ``xdebug.ini`` for ``xdebug.idekey``. In the example of this
tutorial, the value was set to ``PHPSTORM``.
Docker on MacOS
---------------
.. toctree::
:glob:
:maxdepth: 1
:hidden:
/intermediate/configure-php-xdebug/editor-*
Configuration
-------------
/intermediate/configure-php-xdebug/macos/*
.. seealso::
* :ref:`configure_php_xdebug_editor_atom`
* :ref:`configure_php_xdebug_editor_phpstorm`
* :ref:`configure_php_xdebug_editor_sublime3`
* :ref:`configure_php_xdebug_editor_vscode`
* :ref:`configure_php_xdebug_mac_atom`
* :ref:`configure_php_xdebug_mac_phpstorm`
* :ref:`configure_php_xdebug_mac_sublime`
* :ref:`configure_php_xdebug_mac_vscode`
Docker on Windows
-----------------
.. toctree::
:glob:
:maxdepth: 1
:hidden:
/intermediate/configure-php-xdebug/windows/*
.. seealso::
* :ref:`configure_php_xdebug_win_atom`
* :ref:`configure_php_xdebug_win_phpstorm`
* :ref:`configure_php_xdebug_win_sublime`
* :ref:`configure_php_xdebug_win_vscode`
Docker Toolbox
--------------
Docker Toolbox configuration is equal, no matter if it is started on MacOS or Windows, as both
use a Linux system inside VirtualBox.
.. toctree::
:glob:
:maxdepth: 1
:hidden:
/intermediate/configure-php-xdebug/toolbox/*
.. seealso::
* :ref:`configure_php_xdebug_toolbox_atom`
* :ref:`configure_php_xdebug_toolbox_phpstorm`
* :ref:`configure_php_xdebug_toolbox_sublime`
* :ref:`configure_php_xdebug_toolbox_vscode`