XDEBUG 挂在虚拟托管域上

发布于 2025-01-08 11:22:14 字数 613 浏览 4 评论 0原文

当我将常规 localhost/domain 与 xdebug 一起使用时,xdebug 工作正常。但是,我还在本地计算机上设置了虚拟主机,因此如果我使用 xdebug 并调用域。 test.domain.com。 xdebug 挂起。

我确实找到了可能是什么的线索。在我的 php.ini 文件中,如果我将 xdebug.remote_host=localhost 更改为 xdebug.remote_host=vhost_domain_name 。有用。所以我想问题是,我可以设置多个虚拟主机域供 xdebug 进行查找吗?

[编辑]

我道歉。我没有发布我的设置:P。没有意识到。

zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"

when I use the regular localhost/domain with xdebug, xdebug works fine. however, I also have virtual hosting set up on my local machine so if I use xdebug and call on the domain. test.domain.com. The xdebug hangs.

I did find a clue on what it maybe. in my php.ini file, if I change xdebug.remote_host=localhost to xdebug.remote_host=vhost_domain_name. It works. so I guess the question is , can I setup multiple vhost domains for xdebug to look out for.

[EDIT]

I apologize. I didnt post my setting :P . Didnt realize it.

zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

阳光的暖冬 2025-01-15 11:22:14

不,您不能“为 xdebug 设置多个虚拟主机域以进行查找”,因为是 Xdebug 连接到您的 IDE,而不是相反。 xdebug.remote_host 值应该是运行 IDE 的计算机的主机名或 IP 地址。

No, you can not "setup multiple vhost domains for xdebug to look out for" because it is Xdebug that connects to your IDE and not the other way around. The xdebug.remote_host value should be the hostname or IP address of the machine on which your IDE runs at.

尤怨 2025-01-15 11:22:14

请参阅 xdebug.remote_connect_back

如果启用,xdebug.remote_host 设置将被忽略,Xdebug 将
尝试连接到发出 HTTP 请求的客户端。它检查
$_SERVER['REMOTE_ADDR'] 变量来查找要使用的 IP 地址。
请注意,没有可用的过滤器,任何人都可以
连接到网络服务器然后就可以开始调试
会话,即使它们的地址与 xdebug.remote_host 不匹配。

see xdebug.remote_connect_back

If enabled, the xdebug.remote_host setting is ignored and Xdebug will
try to connect to the client that made the HTTP request. It checks the
$_SERVER['REMOTE_ADDR'] variable to find out which IP address to use.
Please note that there is no filter available, and anybody who can
connect to the webserver will then be able to start a debugging
session, even if their address does not match xdebug.remote_host.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文