我使用以下设置在 PHP 中配置了 XDebug
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.var_display_max_depth=1000
xdebug.var_display_max_data=100000
xdebug.var_display_max_children=10000
xdebug.auto_trace=On
xdebug.collect_includes=On
不久之后,它在/tmp 中创建了 17GB 的跟踪文件:)
我真的不关心将跟踪写入文件。我怎样才能关闭该功能?
将 xdebug.auto_trace
更改为 off
似乎有效,我认为这不是正确的方法。文档说这是为了在使用 auto_prepend 时允许跟踪,并且我在我的项目中使用 auto_prepend,因此希望在添加这些文件之前开始跟踪。
最佳答案
xdebug.auto_trace
设置是正确的。您需要将其设置为“开”(默认为“关”)才能进行跟踪。如果您不再需要痕迹,则需要再次将其“关闭”。
文档只说它可以可能通过 auto_prepend 跟踪函数。如果没有它,它不会跟踪 auto_prepend 文件中的函数,但会在脚本的正常部分中跟踪函数。
关于php - XDebug - 禁止将跟踪写入文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17310592/