【发布时间】:2022-06-20 18:05:27
【问题描述】:
我可以触发 PHP 调试会话(用于 CLI 和 Apache),但在尝试分析时,它仅在 CLI 模式下而不是在 Apache2 下工作。
这是我的 Xdebug 配置(xdebug.ini):
zend_extension=xdebug.so
xdebug.remote_handler=dbgp;
xdebug.mode=debug,profile;
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1;
xdebug.client_port=9003;
xdebug.discover_client_host = 1;
#xdebug.log_level=0;
#problems about xdebug profile itself
xdebug.log="/tmp/xdebugprofile/xdebug.log"
xdebug.output_dir = "/tmp/xdebugprofile";
xdebug.profiler_output_name = "cachegrind.out.%u.%H_%R";
知道这种不一致的行为吗?
(Linux Mint 20、PHP 8.0、Apache2)
【问题讨论】:
-
显示通过 Apache 捕获的整个
xdebug_info();输出。也许有些更改没有在那里应用?也许 Apache 进程没有足够的权限写入该文件夹? (但如果它在那里生成 Xdebug 日志,那么它应该不是问题)。我现在没有其他想法。附言xdebug.remote_handler=dbgp;-- 那是 Xdebug v2,即使在那里它也不会做任何事情。
标签: php xdebug xdebug-3 xdebug-profiler