Xdebug + PhpStorm stopped working


Is there somewhere a manual how to get xdebug to run with phpstorm. It worked but it stopped working. I have the “xdebug + phpstorm” addon installed, click the “Add Run configuration to phpstorm” and than I click the debug button. A new browser tab opens with the “XDEBUG_SESSION_START” getParam and the log says “Waiting for incoming connetction with ide key” but nothing happens.

Do I need to change settings or something?

All the best,

We don’t have a definitive guide, but there’s a bunch of interesting details in this topic: Xdebug nightmare - #8 by Glauber

Basically, the main reason this is so complicated is that it depends a lot on:

  1. The version of PHP/Xdebug. The 3.x version of Xdebug changed the default port it listens on.
  2. The version of PHPStorm. I don’t remember exactly, but I know there was a period there that PHPStorm just didn’t work for certain setups of Xdebug.
  3. Local version. This is mostly because different versions of Local ship will different versions of PHP.

When I looked at this a while ago, it seemed like for the latest versions of Local/Xdebug, we didn’t need the Xdebug+PhpStorm addon. You might take a look at this video to see if it helps:

Thank you for your answer.

I had to install xdebug via homebrew (seems like there was an issue after an update) and delete everything in phpstorm in PHP | Servers. After that it started to work again. I also don’t need the addon anymore so I also deleted the configuration file.

1 Like