Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mkrvaric's avatar

xdebug There was a problem sending 179 bytes on socket 10: Broken pipe

I'm using PHPStorm on Mac. I'm trying to debug laravel application inside the sail container on the remote Ubuntu server.

Error I can see from xdebug inside sail container is:

[17] Log opened at 2021-09-26 21:24:59.590599
[17] [Step Debug] INFO: Checking remote connect back address.
[17] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[17] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 89.164.145.129:9003.
[17] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: host.docker.internal:9003. :-|
[17] [Step Debug] INFO: Connected to debugging client: XXX.XXX.XXX.XXX:9003 (from HTTP_X_FORWARDED_FOR HTTP header), host.docker.internal:9003 (fallback through xdebug.client_host/xdebug.client_port). :-)
[17] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/server.php" language="PHP" xdebug:language_version="8.0.5" protocol_version="1.0" appid="17" idekey="phpstorm"><engine version="3.0.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>

[17] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[17] [Step Debug] WARN: 2021-09-26 21:24:59.896494: There was a problem sending 179 bytes on socket 10: Broken pipe.
[17] Log closed at 2021-09-26 21:24:59.898408

I've set up server, ssh tunnel, auto file deployment, xdebug, and validated in the phpstorm, but I keep getting this error.

The issue is that phpstorm is listening for debug connections, but retrieves none, debug is not triggered in IDE.

0 likes
0 replies

Please or to participate in this conversation.