Using XDebug to trace a PHP web service page

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

    To trigger the debugger the simplest solution is to use the cookie approach -b XDEBUG_SESSION=ECLIPSE_DBGP worked for me on eclipse, see below:

    curl  -H 'Content-type: application/json' \
          -b XDEBUG_SESSION="ECLIPSE_DBGP" \
          -X POST \
          -d '{"uid":200, "message":"asdsad","message_type":1}' 
          http://daxuebao.local:8083/api/message/send
    

提交回复
热议问题