Cannot get XDEBUG to work

Hi, I tried everything I could to make Xdebug run :(


My log says:

Log opened at 2018-02-09 07:30:37
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" fileuri="file:///Users/peter/Projects/study/vendor/symfony/web-server-bundle/Resources/router.php" language="PHP" xdebug:language_version="7.2.1" protocol_version="1.0" appid="5549" idekey="PHPSTORM"><engine version="2.6.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" status="stopping" reason="ok"></response>

Log closed at 2018-02-09 07:30:37

So it would seem everything should work. However, nothing happens inside PHPStorm, I cannot get debug window to show anything. I am listening for remote debug events, but nothing shows up.

Is there any way you could help me?




One thing that I noticed is a `broken pipe` error in the symfony server component's log:


Actually, I just solved the issue by changing port 9000 to 9001.

I have tried this previously, i thought hitting "Apply" button is enough to make it run.

However, the whole application PHPStorm needs to be restarted in order for it to start listening on a new port.


This can be closed now. Thanks.


>However, the whole application PHPStorm needs to be restarted in order for it to start listening on a new port.

No need for restarting whole IDE -- just stop the debugger.

Perhaps you must have had PHP Debugger already listening for incoming connections at that time (if no debug toolwindow visible ... then it might be active "phone handle" icon)... But then -- on Mac PhpStorm is unable to properly identify if port is already busy or not (such detection works fine on Windows/Linux though).


>So it would seem everything should work.

That xdebug log of yours shows that you most likely have php-fpm running on your machine (and it uses TCP 9000 port by default) -- that's a typical response that it produces when xdebug connects there. Changing xdebug port to 9001 or some another number is the way to go.


Please sign in to leave a comment.