0

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

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

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

4

1 回答 1

0

好的,

基于此解决方案得到它:使用 XDebug 跟踪 PHP Web 服务页面

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

[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”启动您的 Web 服务请求
  3. 在 Netbeans 中继续执行
  4. 执行应在 web 服务断点处停止。

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

于 2013-08-01T11:55:41.237 回答