临时禁用 blackfire 模块

Disable blackfire module temporary

我已经成功安装了 blackfire 代理、cli 工具和探测器,并且运行良好。我在使用 bf 进行分析时禁用了 xdebug 模块。

现在我想像以前一样使用xdebug,但是xdebug 不起作用,它只是不会进入调试会话。没有断点,甚至 xdebug_break 都不起作用。生产者网站的引述说:

Known incompatibilities

Please note that PHP compiled with debug are not supported and that the Probe may conflict with XDebug or XHProf; disable those extensions when enabling the Probe.

有没有办法禁用 blackfire 代理 而不用 卸载整个 blackfire 工具链?将文件 /etc/php5/conf.d/90-blackfire.ini 移动到备份位置失败。

更新 有效的方法是卸载 php 代理 sudo apt-get remove blackfire-php。但我很确定一定有更好的解决方案。

您可以简单地编辑文件 /etc/php5/conf.d/90-blackfire.ini 并注释以下行 extension=blackfire.so。不要忘记重启 apache2 或 php-fpm

可以运行下一个命令关闭PHPextensions/modules:

$ sudo phpdismod blackfire

这条命令的反义词是:

$ sudo phpenmod blackfire

要应用所有更改,您必须重新启动服务。示例:

$ sudo service php7.4-fpm restart