Reputation: 21
I can't seem to get my Xdebug to work with PhpStorm.
It works fine for PHPUnit tests, so I'm assuming it's an issue with my local server.
Now for those tests I always have a Configuration for the Test-Class in question (those seem to auto-generate). I do not have one of those prepared for the class I'm currently trying to test (I seem to remember it working at some point and never having an explicit Configuration, but my memory is hazy).
My CLI-Interpreter (having Xdebug registered):
I'm trying to debug a Magento application running on localhost, port 80.
Upvotes: 1
Views: 333
Reputation: 21
The issue was that my CLI and Webserver were using different configurations. Thus tests were working fine (using the CLI configuration) but debugging incoming connections did not work (using the Webserver configuration).
The configuration used can be checked via phpinfo() (or php -i for the CLI). In my case the CLI configuration could be found under /etc/php/{version}/cli and /etc/php/{version}/fpm respectively. Both contained a folder called conf.d in which Symlinks to the desired modules have to be placed (for me they could be found under /etc/php/{version}/mods-available). I added the Symlink for Xdebug in my .../fpm/conf.d configuration and it worked like a charm.
Thanks again for the helpful comments.
Upvotes: 1