繁体   English   中英

如何在 Apache 中启用 XDebug 而不是在 CLI 中?

[英]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/有一个apache2cli目录。 要在 '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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM