My scenario:
My local machine is running PHP with Xdebug, along with my IDE. It is accessible from the internet on port 80 and 443.
A remote API is calling the URL I give it.
I want to give the remote API the address of http://myaddr/callback.php?XDEBUG_SESSION=foo and have my local IDE debug this request.
There doesn’t seem to be a need to have both the caller and the debug server be the same, but how do I configure this in Xdebug?
Current settings
[xdebug]
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.idekey=foo
I found my mistake:
I needed to start the session with
XDEBUG_SESSION_STARTso I have to give the APIhttp://myaddr/callback.php?XDEBUG_SESSION_START=fooXDEBUG_SESSIONis for when the session is already started.