将 Netbeans 附加到 XAMPP Web 服务上的 XDebug 失败 [英] Attaching Netbeans to XDebug on XAMPP Webservice fails

查看:28
本文介绍了将 Netbeans 附加到 XAMPP Web 服务上的 XDebug 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 XAMPP 1.8.1 和 Netbeans 7.3 调试从我的 C#/.Net 应用程序调用的网络服务.虽然集成调试与 Netbeans 配合良好,但我无法手动附加调试器来拦截对 web 服务功能的调用.我不确定正确的用法是怎样的.主要问题似乎是在尝试附加调试器时 xdebug 还没有运行.当外部应用程序访问网络服务时,我目前不知道如何正确实现这一点.

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.

我曾尝试向本地 xampp 服务器发出先前的..php?XDEBUG_SESSION_START=netbeans-xdebug"调用,但没有帮助或未正确完成.

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.

如何正确设置与我的应用程序一起运行的 xdebug 会话,以便我可以正确附加 Netbeans 调试器,然后可以调试单个 Web 服务调用?

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 ?

推荐答案

好的,

根据这个解决方案得到它:使用 XDebug 跟踪 PHP Web 服务页面:

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

以下是与 xampp 一起使用的 php.ini 配置:

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. 启动Netbeans Debugging,使入口页面停在第一行
  2. 使用附加的./service.php?XDEBUG_SESSION_START=netbeans-xdebug"启动您的网络服务请求
  3. 在 Netbeans 中继续执行
  4. 执行应在网络服务断点处停止.

只要在 netbeans IDE 中正确配置了正常的 xdebug 功能,这应该可以工作.在 Win7 x64 上使用 XAMPP 1.8.1 测试.

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.

这篇关于将 Netbeans 附加到 XAMPP Web 服务上的 XDebug 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆