[英]How to enable XDebug in Apache but not in CLI?
我想在由 Apache 运行的 PHP 中启用 XDebug 模块,但不是为 CLI php
命令启用。 我在 Mac 上,我安装了 Homebrew 的 Apache (httpd) 和 PHP 7.3。
PHP 在启用 XDebug 的情况下运行速度要慢得多,即使我没有调试给定的php
命令。
CLI 和 Apache 有单独的 php.ini。 在/etc/php/7.3/
有一个apache2
和cli
目录。 要在 'apache2/php.ini' 中启用 Xdebug,请添加以下几行:
xdebug.remote_autostart=1
xdebug.remote_enable=1
对于 Xdebug 的分析器:
xdebug.profiler_enable=1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.