Using XDebug to trace a PHP web service page

前端 未结 6 1863
我在风中等你
我在风中等你 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 08:15

    Here is tip on how to trigger Xdebugger client from Curl without browser:

    1- From command line:

    curl -H "Cookie: XDEBUG_SESSION=1" http://YOUR-SITE.com/your-script.php
    

    2- From PHP

    
    

    So it doesn't matter if you attach "XDEBUG_SESSION=1" to CURL URL, but what is necessary is to send a proper cookie together with request.

提交回复
热议问题