Using XDebug to trace a PHP web service page

前端 未结 6 1874
我在风中等你
我在风中等你 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 08:02

    I ran into this same exact issue. I solved it by turning the auto-start feature off in php.ini:

    xdebug.remote_autostart = 0
    

    and then adding the API key to the webservice URL that my webservice client calls:

    ?XDEBUG_SESSION_START=
    

    and I'm not sure if this matters, but I entered the API key into my debugger (MacGDBp). Now the debugger fires up only when the webervice server-side script is called, not when the client is started.

    Hope this helps.

提交回复
热议问题