How can I use xdebug to debug only one virtual hos

2019-01-23 08:12发布

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

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

How can I do this?

1条回答
疯言疯语
2楼-- · 2019-01-23 08:45

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

and turn on only .htaccess with directive:

php_flag   xdebug.remote_enable on
查看更多
登录 后发表回答