【发布时间】:2019-11-06 11:37:07
【问题描述】:
我想将 Xdebug 配置设置为仅适用于 CLI 而不是浏览器的位置。 原因是我只想为 CLI 测试这个工具。下面是 xdebug.ini
#this line will be added automatically
zend_extension = /usr/lib64/php/modules/xdebug.so
#add the following
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_enable_trigger_value = 3236
xdebug.profiler_output_name = cachegrind.out.%t
xdebug.profiler_output_dir = /net/tmp/
【问题讨论】:
-
你的 cli 和 webapp 有单独的 php.ini 吗?
-
不,我没有
-
你试过
xdebug.remote_autostart=1 -
取决于您的设置,可能会或可能不会导致 xdebug 始终在浏览器中运行,因此您必须对其进行测试
-
是的,这不能满足我的问题。我想要的是我不希望 xdebug 对我的网页进行分析,而是对我的 Cron 和 cli php 文件进行分析
标签: php xdebug xdebug-profiler