When using any route defined from an API Platform entity, Xdebug hangs. I'm on a Linux host. My backend docker image is dunglas/frankenphp.
zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.idekey=docker
xdebug.start_with_request=yes
xdebug.log=/dev/stdout
xdebug.log_level=10
xdebug.client_port=9003
xdebug.client_host=$(ip route | awk '/default/ { printf $3 }')
My PhpStorm 2023.3 config works, as other requests from the same backend break on request, and work. The amount of simultaneous connections allowed does not seem to be at fault.
The tail of my container log is:
[138439001368256] [Step Debug] <- context_get -i 16 -d 0 -c 1
[138439001368256] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="16" context="1">..</response>
[138439001368256] [Step Debug] <- context_get -i 17 -d 0 -c 2
[138439001368256] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="17" context="2"></response>
[138439001368256] [Step Debug] <- run -i 18
Which makes me think the debugger is hanging on that run instruction. The debugger window just says "Connected" with no frames and all options greyed out.
After that first request hang, any subsequent request will hang as well, and will not appear in PhpStorm.
[138439001368256] [Step Debug] <- run -i 18
[138438984582848] Log opened at 2024-03-17 14:40:30.724382
[138438984582848] [Config] INFO: Control socket set up succesfully: '@xdebug-ctrl.138438984582848'
[138438984582848] [Step Debug] INFO: Connecting to configured address/port: 172.25.0.1:9003.
[138438984582848] [Step Debug] INFO: Connected to debugging client: 172.25.0.1:9003 (through xdebug.client_host/xdebug.client_port).
[138438984582848] [Step Debug] -> <init ... /init>
[138438976190144] Log opened at 2024-03-17 14:40:38.688502
[138438976190144] [Config] INFO: Control socket set up succesfully: '@xdebug-ctrl.138438976190144'
[138438976190144] [Step Debug] INFO: Connecting to configured address/port: 172.25.0.1:9003.
[138438976190144] [Step Debug] INFO: Connected to debugging client: 172.25.0.1:9003 (through xdebug.client_host/xdebug.client_port).
[138438976190144] [Step Debug] -> <init... /init>
I have no clear idea what is going on, whether this is an issue with Xdebug or PhpStorm, or my config.
Any idea on what is going on would be appreciated.
Thank you
PHP 8.3.4 (cli) (built: Mar 16 2024 00:13:50) (ZTS)
Copyright (c) The PHP Group
Zend Engine v4.3.4, Copyright (c) Zend Technologies
with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies
with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans