Home » Php » php – PhpStorm debugger not stopping at BreakPoints; keeps waiting for xdebug _SESSION_

php – PhpStorm debugger not stopping at BreakPoints; keeps waiting for xdebug _SESSION_

Posted by: admin April 23, 2020 Leave a comment


Updated question : PhpStorm | WebMatrix (IISExpress) | Xdebug.remote_port | — Which Port(s) to put where?

I’m running localhost web server on my Windows machine with WebMatrix and IISExpress. I’ve installed PHP and Xdebug in it and they both are working.

I have a local WordPress install.

I’m now trying to get PhpStorm to debug it using Xdebug.

When I run PhpStorm it launches the web app in the browser with relevant debugging parameters in the browser.

IDE KEY is matching


xdebug.remote_port is configured correctly. (Later I found that this is wrong, but not erroneous. It should be port 9000)


But it seems Xdebug never gets to communicate with PhpStorm. PhpStorm keeps listening, and the execution runs completely without stopping at any break-points.


How to&Answers:

These lines are crucial to make it work (in php.ini):

xdebug.remote_autostart = 1 <-------- THIS
xdebug.remote_enable = 1 <----------- AND THIS

Without these lines xdebug never will work on phpstorm 😉


Try changing the xdebug listen port in your php.ini and your IDE.

Running Mac Yosemite, for me the problem was that I installed with homebrew, following a guide that used php-fpm, which uses port 9000 by default (which conflicts with the xdebug default port)… Changing my xdebug.remote_port to 9001 and changing the xdebug port in phpstorm fixed the problem, though I suspect this issue could happen for anyone in any IDE. I googled for the better part of a day and didn’t see this solution (since I believe it’s so specific to install method).. but I hope it helps someone.


Took me about an hour until I noticed that this button wasn’t activated 😉

“Run” -> “Start Listening for PHP Debug Connections”

enter image description here


First check for on what port xdebug is working on, you can find it in your php.ini under xdebug.remote_port=9123. As you can see in my case it is set to 9123.
Now open PhpStorm go to php debug, see screenshot:
enter image description here

under Xdebug you will find Debug port, make sure that its value is the same as in the php.ini file under xdebug.remote_port (9123 in my case).

Hope it helps


For me it was changing the line:


( Mac user: in terminal run ifconfig to find your ip )


If anyone else runs into this issue and is using Vagrant, this is what finally fixed it for me:


That needs to be the IP address of your local machine from inside the Vagrant box, and is the default. If you ssh into your Vagrant box, it will show the IP where you logged in from if you want to confirm.

I know this isn’t directly relevant to the specific setup the OP had, but this post shows up in a lot of xdebug / PhpStorm Google searches so hopefully this can help someone else.


PHPStorm has a build-in tool in Run > Web Server Debug Validation.

It helped me to solve my problem.

enter image description here


Could be a Firewall.

Day 572… Still haven’t slept or eaten… But I finally found the culprit: Windows Defender!

Basically, I had a firewall blocking JetBrains IDE Support chrome extension from sending data to PhpStorm through the default address.


Day 864… Same issue happened again, this time on Linux… But I finally found the culprit: Ubuntu Firewall!

Seriously, this happened to me again a few months later, using Linux, and it was the firewall again. Disabling the firewall solved it sudo ufw disable – If you care for the firewall and want to keep it enabled, gotta dive in deep on creating some sort of whitelist for it.


I also obtain this error message.
Also was troubles with the php.ini but more subtle.

Try to find and delete a row like this


Consider to look at my answer here for details “Xdebug – command is not available“.


There was a syntax error in php.ini. There were extra "quotes" and ;colons;.



I was having this same problem while trying to test a Laravel project using XAMPP on Windows in PHPStorm. I have no idea what exactly I was doing wrong, but I did get it working eventually. I followed the step-by-step instructions on the PHPStorm site here.

One thing I think that was not configured right was that there was no interpreter set up in the PHP menu in Settings.

I was also trying a few too many combinations of settings in my php.ini. These were the settings that I have when things were working:

zend_extension = C:\xampp\php\ext\php_xdebug-2.3.2-5.6-vc11.dll //as recommended from the Xdebug site itself 
xdebug.profiler_output_name = "cachegrind.out.%t-%s"

In my Run/Debug Configurations, I use a PHP Web Application setting, that just starts on the root of the site. (At first, I thought the appended ?XDEBUG_SESSION_START=<xxxxxxx> was a mistake, but it is not). Hopefully that might help if someone else is facing a similar issue.


I had an issue where one project would work and not another one. I tried many different configurations and I tried looking at the logs of xdebug, etc. This fix seems to have resolved my issue:

Try setting your actual ports of xdebug to 9123 instead 9000.

The new version (9) of PHPStorm changed its default xdebug connetion port to 9123 (the PHPSTORM config, not the actual xdebug config), probably for a good reason, since having the PHPSTORM config to the xdebug default 9000 didn’t work but having them set to 9123 did work and resolved the issue.


I tried any of the suggested tricks and finally I called the script by instead of localhost/script.php and bingo!


Based on peteclark3 answer:

I think one of solutions if you have multiple php-fpm versions with xdebug, like php5.6-fpm, php7.1-fpm – make sure only one is running. I had both 5.6 and 7.1 running. Then tried to change on 7.1 to 9001 port. But if I change to 9001 port in PhpStorm, then 5.6 starts not working, because it listens on 9000. So each time you change php version, then probably you would need to change setting in phpStorm. So I think it is better to have only one of php-fpm running and all php-fpm versions can use same port.


Right click “Console” tab and uncheck “Focus on startup” (as seen in below image) should do the trick
enter image description here