I\'m using Eclipse and XDebug to develop a PHP application that relies on web services. I have test pages that consume my services in 2 ways: AJAX (using jQuery) and cURL.>
When you are debugging the Ajax request, that one is sent by the browser, in the same navigation context as the other (non-Ajax) requests -- which is why it works fine.
The request sent by curl is in another, different, context -- and I'm not sure you can hook the debugger into that... But, maybe...
First of all, here's an information that might prove helpful, quoting the Xdebug's documentation :
Xdebug contains functionality to keep track of a debug session when started through a browser: cookies. This works like this:
- When the URL variable
XDEBUG_SESSION_START=nameis appended to an URL Xdebug emits a cookie with the name "XDEBUG_SESSION" and as value the value of theXDEBUG_SESSION_STARTURL parameter.- When there is a GET (or POST) variable
XDEBUG_SESSION_STARTor theXDEBUG_SESSIONcookie is set, Xdebug will try to connect to a debugclient.- To stop a debug session (and to destroy the cookie) simply add the URL parameter
XDEBUG_SESSION_STOP. Xdebug will then no longer try to make a connection to the debugclient.
Maybe it might work if you set that cookie "by hand", sending it allong the curl request...
I suppose you'd first have to get its value, as set by Xdebug at the beginning of the debugging session -- re-using the cookie you have in your browser should be possible, though.
Note : I've never tried this -- if you try, and it works, could you please confirm it worked ?