Attaching Netbeans to XDebug on XAMPP Webservice fails

早过忘川 提交于 2019-12-11 19:20:13

问题


I would like to debug a webservice which is called from my C#/.Net Application using XAMPP 1.8.1 and Netbeans 7.3. Whereas the integrated debugging works fine with Netbeans I can't attach the debugger manually to intercept the calls to the webservice functions. I'm not exactly sure how the correct usage is. The main problem seems to be that xdebug is simply not yet running when trying to attach the debugger. I have no clue at the moment how to achieve this correctly, when an external application accesses the webservice.

I've tried to fire a previous "..php?XDEBUG_SESSION_START=netbeans-xdebug" call to the local xampp server, but it didn't helped or it was uncorrectly done.

How do I correctly set up a running xdebug session with my app so I can attach the Netbeans debugger correctly and can then debug the single webservice calls ?


回答1:


OK,

got it based on this solution: Using XDebug to trace a PHP web service page:

Below is the php.ini configuration used with xampp:

[XDebug]
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable =1
xdebug.remote_handler ="dbgp"
xdebug.remote_port=9000
xdebug.remote_host ="localhost"
xdebug.trace_output_dir = "\xampp\tmp"
  1. Start Netbeans Debugging, so that the entry page is stopped at the first line
  2. Start your webservice request with an attached "./service.php?XDEBUG_SESSION_START=netbeans-xdebug"
  3. Continue execution in Netbeans
  4. Execution should stop on the webservice breakpoint.

This should work as long as normal xdebug function is properly configured in the netbeans IDE. Tested with XAMPP 1.8.1 on Win7 x64.



来源:https://stackoverflow.com/questions/17989222/attaching-netbeans-to-xdebug-on-xampp-webservice-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!