Using XDebug to trace a PHP web service page

前端 未结 6 1880
我在风中等你
我在风中等你 2020-12-10 07:39

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.

6条回答
  •  渐次进展
    2020-12-10 07:55

    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:

    1. Start debug session with a simple debug.php file that contains only a and nothing else. It stops on the first line, you "continue" it and it finishes execution.
    2. Now request the script using cURL (or another browser) adding ?XDEBUG_SESSION_START=ECLIPSE_DBGP to its path (I even think this addition is optional)
    3. Your script should show up in the debug view stopped at the first line

    Hope ths helps.

提交回复
热议问题