开发者

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 in开发者_运维知识库ternal 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜