多用户 XDebug 和 PHP 调试 [英] Multiple users XDebug and PHP Debugging

查看:27
本文介绍了多用户 XDebug 和 PHP 调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何设置多开发者 XDebug PHP 环境?

How do you setup a multi-developer XDebug PHP environment?

我有以下设置:

  • 我有一台装有 Apache 和 Xdebug 的 linux 机器,还有一个我认为正确的 php.ini 文件.
  • 我找到了一个 python 代理脚本,我用它来代理来自我的开发人员正在使用的 PDT Eclipse IDE 的调用到在同一 Web 服务器上运行的 Apache/Xdebug.
  • 我将 php.ini 中的 idekey 设置为ECLIPSE_DBGP"并让 Xdebug 自动启动

根据来自代理的日志信息,它说没有带有密钥ECLIPSE_DBGP"的服务器并停止请求.

From the log information from the proxy it says that there is no server with the key "ECLIPSE_DBGP" and it stops the request.

有没有人遇到过这个问题或者有一步一步的设置来让它工作?

我已经用尽了我用谷歌找到的东西.

I have exhausted what I have found using google.

推荐答案

您可以使用 ssh 将调试连接通过隧道返回到您的客户端计算机.例如.从您的客户端计算机,使用以下内容连接到服务器:

You can use ssh to tunnel the debug-connection back to your client machine. Eg. from your client machine, connect to the server with something like:

ssh -R 9000:localhost:9000 you@example.com

然后启动您的(本地)调试器,并启动远程脚本.Xdebug(在服务器上)现在将建立到它的 localhost:9000 的连接,但是由于这个端口被转发回你的本地机器,你的(本地)调试器将接收连接.

Then fire up your (local) debugger, and start the remote script. Xdebug (at the server) will now establish a connection to its localhost:9000, but since this port is forwarded back to your local machine, your (local) debugger will receive the connection.

如果你在客户端使用 Windows,你可以用 PuTTY 做同样的事情.

If you use Windows on your client side, you can do the same thing with PuTTY.

有关更多详细信息,请参阅 Spectator 文档.

这篇关于多用户 XDebug 和 PHP 调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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