Ryall
Ryall

Reputation: 12281

How do I start Xdebug over an internal HTTP request?

I have Xdebug set up nicely using an SSH tunnel. When connecting from the command line I use the XDEBUG_CONFIG environmental variable and when connecting over HTTP I use the XDEBUG_SESSION cookie. Both work brilliantly.

My issue is that the project I am working on makes internal HTTP requests to an internal API. As the request is repeated internally, it doesn't continue the session and I therefore cannot debug anything in the API when it comes from a front-end request.

Is there a way to fix this so that I can debug both?

Upvotes: 0

Views: 443

Answers (1)

Derick
Derick

Reputation: 36784

There is http://xdebug.org/docs/remote#remote_autostart that will always (try to) start a remote debugging session. If it's just from the browser, you might want to look at one of the browser extensions that automatically add a cookie without any user interference: http://xdebug.org/docs/remote#browser-extensions

cheers, Derick

Upvotes: 2

Related Questions