

It should stop there.Ī note from If you want to have xdebug running only for fpm, phpenmod -s fpm xdebug for example, instead of running enable_xdebug.Ī note from If you use a browser extension like XDebug Helper which sets an IDE key, that must be the same as on the server.

You can use php -i | grep grep Xdebug inside the container, or use any other technique you want that gives the output of phpinfo(), including Drupal's admin/reports/status/php. Check to make sure that Xdebug is enabled.If not, maybe PHPStorm is not listening, or not configured to listen on port 9003?

ddev ssh and try the telnet 9003 again.Now click the listen button on PHPStorm to start it listening for connections.Don't continue until your telnet command does not connect. Use lsof -i :9003 -sTCP:LISTEN to find out what is there and stop it, or change the xdebug port and configure PHPStorm to use the new one. ddev ssh: Can telnet 9003 connect? If it does, you have something else running on port 9003, probably php-fpm.In PHPStorm, disable the "listen for connections" button so it won't listen.Can you ping (and get responses)? If you can't, you might have an over-aggressive firewall. Oh-so-many times people think it should be stopping, but their code is not being executed. Start by putting a breakpoint at the first executable line in your index.php. Don't assume that some obscure piece of code is being executed and put a breakpoint there.Most people use ddev xdebug on to enable it when they want it, and ddev xdebug off when they're done with it, but it can also be enabled in. Make sure xdebug has been enabled it's disabled by default for performance reasons.You may want to read the troubleshooting docs rather than this issue, since they're maintained more often. After all, we want you to be successful with the tools and workflows you know and love.Debugging xdebug in any setup can be a little trouble, but here are the steps to take: It works exactly the same on Windows or Linux, and with WSL2 as well. You can get a working debug environment in a few minutes! We’ll walk you through it in this screencast using macOS. The combination of PhpStorm and DDEV‘s plug-and-play approach to debugging makes those configuration struggles obsolete. Enter our open source local development environment, DDEV. The days of print-debugging are long behind us! Xdebug and PHP IDEs have made that approach unwieldy, but often the configuration between your IDE, PHP, web server, and Docker is challenging and fragile.
