Been a while but it may help someone… Response to Caddy and Xdebug - Connect back - #6 by spitfire.
If you’re on Windows and you want Xdebug to connect back to your IDE, turning off xdebug.remote_connect_back
and defining xdebug.remote_host=localhost
explicitly worked.
;xdebug.remote_connect_back=1
xdebug.remote_host=localhost
Here’s an example:
localhost:8080 {
# ...
# Xdebug is on port 9000.
# Start php-cgi.exe on another port.
# Turn off xdebug.remote_connect_back and define xdebug.remote_host
# in your php.ini or override it here.
on startup \php\php-cgi.exe -b 9001 -d xdebug.remote_connect_back=0 -d xdebug.remote_host=localhost &
fastcgi / 127.0.0.1:9001 php
}