My development environment is: - MacOs High Sierra - PhpStorm - PHP 5.6 - Apache 2.4 - Xdebug 2.5.5
php config file for xdebug:
[xdebug]
zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=jit
xdebug.remote_autostart=1
xdebug.remote_handler = dbgp
xdebug.force_display_errors=1
xdebug.idekey="PHPSTORM"
xdebug.remote_enable=1
xdebug.show_error_trace=1
xdebug.remote_log="/Users/user/www/xdebug_remote.log"
xdebug.profiler_enable=0
xdebug.profiler_output_dir="/Users/user/www/xdebug_profiler"
In PHPStorm debug validate tool it seems everything is up and running:
The xdebug debug log is
log opened at 2018-03-21 12:56:51
I: Connecting to configured address/port: 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
fileuri="file:///Users/users/www/slt/index.php" language="PHP"
xdebug:language_version="5.6.33" protocol_version="1.0" appid="2764"
idekey="PHPSTORM"><engine version="2.5.5"><![CDATA[Xdebug]]></engine><author>
<![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url>
<copyright><![CDATA[Copyright (c) 2002-2017 by Derick Rethans]]></copyright>
</init>
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok">
</response>
Log closed at 2018-03-21 12:56:51
To run in debug mode I follow those steps.
I can't figured out why the breakpoints aren't hit. Anyone can give me some hints?
It's not PhpStorm that is listening for port 9000, most probably it's php-fpm. Change the debugging port to 9001 in PhpStorm and the .ini file.