有没有办法限制xdebug生成的跟踪深度?

时间:2011-09-29 16:15:59

标签: php trace xdebug

问题就是这么说,真的。

我想弄清楚为什么一个php应用程序行为不端,但xdebug向我抛出的大量数据使得很难理解这个流程。

如果我可以设置跟踪的深度,以便跳过超过x级别的任何调用,那么将更容易理解发生了什么。任何想法如何使xdebug这样做,还是有一个我可以使用的替代工具?

2 个答案:

答案 0 :(得分:2)

Xdebug对文件的函数/执行跟踪目前不支持这一点,Xdebug的堆栈跟踪也总是显示整个堆栈我刚刚向问题跟踪器添加了一个功能请求:http://bugs.xdebug.org/view.php?id=722

德里克

答案 1 :(得分:1)

您可以通过在代码中调用functions <table id="tables" class="table table-striped" style="width:100%;"> <thead> <tr style="font-size:14px;"> <th scope="col">ID</th> <th scope="col">Name</th> <th scope="col">Ship to</th> <th scope="col">Email</th> <th scope="col">Telephone</th> <th scope="col">Store Location</th> <th>Destination Kilometers</th> <th scope="col">Customer Other Details</th> <th scope="col">Date Called</th> <th scope="col">Action</th> </tr> </thead> <tbody style=" font-size:14px;"> </tbody> </table> xdebug_start_trace()来告诉Xdebug在哪里启动和停止函数跟踪。

对于Xdebug 2.4或更高版本,您还可以通过调用function xdebug_stop_trace()将Xdebug限制为仅跟踪某些功能的执行。该数组包含要跟踪的函数的列表。