PhpStorm PHP Xdebug appears to only be listening on port 9003, not reading preferences->PHP->debug->Debug port settings

Issue Summary - See thread topic.

Troubleshooting Questions - Happens for all sites in Local. Only problem is using Xdebug with PhpStorm & Local. Everything else works as it should.

Replication - I completely wiped (including all application support files) my original install (several years old) of Local & installed a fresh copy. The description below is repeatable every time. I submitted the help request below to JetBrains and am awaiting a reply.

Detail description -

“I am using PhpStorm with Local (https://localwp.com) Version 6.4.2+6012 to debug WordPress PHP code. The Local config files (conf/php.ini.hbs) used to create each php.ini file for each PHP version offered by Local (5.6.39, 7.3.5, 7.4.1, 8.0.0) all set xdebug.remote_port=“9000” (yes, even though port 9003 is to be used for PHP 8+ with Xdebug 3). In PhpStorm preferences, the Debug port settings were set to “9000,9003”. The Xdebug server and client did not connect for any PHP version set in Local. I changed the PhpStorm Debug port settings to just “9000”. The Xdebug server and client did not connect for any PHP version set in Local. I changed the PhpStorm Debug port settings back to “9000,9003” and then changed the php.ini.hbs config file for all PHP versions (including 7.4.1 for which the config files are actually stored inside the MacOS Local pkg) to just “9003”. The Xdebug server and client DID connect for any PHP version set in Local. This leads me to believe that there may be a bug in this version of PhpStorm, possibly as a result of the debugging rewrite. Please advise. Thanks!”

System Details - Version of Local is 6.4.2+6012, OS version is Mac OS 12.5.1

Local logs - Local logs are at Dropbox - Local Version 6.4.2+6012 debug logs - Simplify your life.

I don’t believe this problem (it took me about 2 days to finally nail it down) is with Local, I think the problem however is with the latest version of PhpStorm. However, I do believe if there was a simpler way to set the Xdebug ports in Local it would be a huge help. To get everything working (including PHP 7.4.1) required me to open the MacOS Local pkg file, search for the php.ini.hbs file & change the port from 9000 to 9003. I’m guessing I’ll have to do it again when a new version of Local code out. :frowning:

Thoughts? I’m hoping that sharing this here saves someone else the days of lost dev time trying to figure out “what the heck is happening.” :slight_smile:

Doug

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.