- #PHPSTORM 2019 DEBUG PHP APPLICATION IN DOCKER CONTAINER INSTALL#
- #PHPSTORM 2019 DEBUG PHP APPLICATION IN DOCKER CONTAINER CODE#
To override the port, add an override file in the project's.
(The most likely conflict is php-fpm, which also has 9000 as a default port.) However, if you have something else listening on that port, you'll need to change the port. Using xdebug on a Port Other than the Defaultīy default, ddev is set up to contact the default port, port 9000 on your IDE. Go to a page in your project, you should hit your breakpoint.Add to the launch.json the stanza defining "Listen for xdebug" (see config snippet).
#PHPSTORM 2019 DEBUG PHP APPLICATION IN DOCKER CONTAINER CODE#
Visual Studio Code (vscode) Debugging Setup "/var/www/html /Users/rfay/workspace/d8git"
#PHPSTORM 2019 DEBUG PHP APPLICATION IN DOCKER CONTAINER INSTALL#
PHPStorm zero-configuration debugging means you only have to: One requires very little effort in the PHPStorm IDE (they call it zero-configuration debugging) and the other requires you to set up a "run configuration", and is basically identical to the Netbeans or Eclipse setup. It provides two different ways to do debugging. PHPStorm is a leading PHP development IDE with extensive built-in debugging support. (If you don't want it set all the time, you can ddev exec enable_xdebug or ddev exec disable_xdebug any time.) Setup for Various IDEs Setup Instructions Enable or disable xdebug in your config.yaml The intention here is that one won't have to understand XDebug to do debugging.įor each IDE the link to their documentation is provided, and the skeleton steps required are listed here. (If you need to change the xdebug port due to a port conflict on your host computer, you can do it with a PHP override, explained below.)įor more background on XDebug see XDebug documentation. The debug server port on the IDE must be set to port 9000, which is the default and is probably already set in most IDEs. Key facts: You need to explicitly enable xdebug in your config.yaml with xdebug_enabled: true (it's disabled by default). So IDEs other than those listed here should work fine, if listening on the default xdebug port 9000. Xdebug is a server-side tool: It is installed automatically on the container and you do not need to install it on your workstation.Īll IDEs basically work the same: They listen on a port and react when they're contacted there. It is disabled by default for performance reasons, so you'll need to enable it in your config.yaml. Every ddev project is automatically configured with xdebug so that popular IDEs can do step-debugging of PHP code.