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.
I add breakpoints to my service page and launch the debugger. When I call the the service from AJAX, execution stops nicely at the breakpoint, and I get my variables, step-by-step control etc.
But when I call the service using cURL (i.e. from within a PHP page), the breakpoints fail to function. Even if I turn on the “Break at first line” debugger option, I cannot get the execution to stop when using cURL.
Is it a debugger behavior? Do I need to add a hearder to my cURL calls? Alter the URL? Or is it an XDebug limitation?
Thanks for your time and effort,
Guy
I can’t comment yet, so I post this as an answer.
Can you debug more than one AJAX request in one session?
Was your debug session still running in Eclipse when you tried to debug using cURL?
Description on how it works for me:
<?phpand nothing else. It stops on the first line, you “continue” it and it finishes execution.Hope ths helps.