php配置xdebug3并生成火焰图flamegraph
2022-06-07 23:27
1207人阅读
评论 (0)
=== Xdebug3 配置
zend_extension=xdebug
xdebug.mode=trace
xdebug.start_with_request=trigger
xdebug.trigger_value=StartProfileForMe
xdebug.trace_output_name = xdebug.trace.%t.%s
xdebug.output_dir = D:/tmp
xdebug.trace_format=1
=== 发起请求
curl http://localhost/?XDEBUG_TRACE=StartProfileForMe`
=== 转换格式
stackcollapse-xdebug.php xdebug.trace.1635786267.xxxxx.xt > out.folded
=== 转换为svg
flamegraph.pl out.folded > laravel-flame-graph.svg // 报错
stackcollapse-xdebug.pl out.folded > laravel-flame-graph.svg // 正常
=== 其它
原地址 https://github.com/brendangregg/FlameGraph
修复地址 hhttps://github.com/raszi/FlameGraph/tree/xdebug-pl