Caddy and Xdebug - Connect back - SOLUTION


(spitfire) #1

Been a while but it may help someone… Response to https://caddy.community/t/caddy-and-xdebug-connect-back/615/6.

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
}

(spitfire) #2

Is there anyway to support Xdebug xdebug.remote_connect_back=1 feature in Windows?