如何使用 xdebug 仅调试一台虚拟主机? [英] How can I use xdebug to debug only one virtual host?

查看:14
本文介绍了如何使用 xdebug 仅调试一台虚拟主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 xdebug,我可以在 phpinfo() 中看到它已安装(但它已关闭).

I have installed xdebug, I can see in phpinfo() that it's installed (but it's OFF).

但是,我不想为整个服务器/apache2启用它,我只想为一个虚拟主机启用它.

However, I don't want to enable it for the whole server/apache2, I just want to enable it for one virtual host.

我该怎么做?

推荐答案

您可以在 php.ini 中设置 xdebug 的 off 值:

You can set xdebug in php.ini with off value:

zend_extension=/usr/lib/php/modules/xdebug.so
xdebug.remote_enable off
xdebug.remote_port 9000
xdebug.idekey PHP-XDEBUG

并仅使用指令打开 .htaccess:

php_flag   xdebug.remote_enable on

这篇关于如何使用 xdebug 仅调试一台虚拟主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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