Configure PHP Xdebug
Configure PHP Xdebug
This section explains in depth how to enable and use PHP Xdebug with the Devilbox.
Introduction
In order to have a working Xdebug, you need to ensure two things:
- PHP Xdebug must be configured and enabled in PHP itself
- Your IDE/editor must be configured and requires a way talk to PHP
Configuring PHP Xdebug will slightly differ when configuring it for a dockerized environment. This is due to the fact that Docker versions on different host os have varying implementations of 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.
configure-php-xdebug-options
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.
/intermediate/configure-php-xdebug/linux/*
configure-php-xdebug-lin-atomconfigure-php-xdebug-lin-phpstormconfigure-php-xdebug-lin-sublimeconfigure-php-xdebug-lin-vscode
Docker on MacOS
/intermediate/configure-php-xdebug/macos/*
configure-php-xdebug-mac-atomconfigure-php-xdebug-mac-phpstormconfigure-php-xdebug-mac-sublimeconfigure-php-xdebug-mac-vscode
Docker on Windows
/intermediate/configure-php-xdebug/windows/*
configure-php-xdebug-win-atomconfigure-php-xdebug-win-phpstormconfigure-php-xdebug-win-sublimeconfigure-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.
/intermediate/configure-php-xdebug/toolbox/*
configure-php-xdebug-toolbox-atomconfigure-php-xdebug-toolbox-phpstormconfigure-php-xdebug-toolbox-sublimeconfigure-php-xdebug-toolbox-vscode