Reduce Stack Frame Depth from XDebug Trace Output

Earlier, I’ve written about how to dump code trace from your PHP application using XDebug, however, more often that not, you get lengthy results and you simply want to get an overview up to certain depth. I’ve created a simple PHP for that which you can find here.

It’s fairly easy to use, simply feed in the path to the trace file and the stack frame depth you desire i.e.

And you get an update like this:

The first and second column are relative changes of execution time and memory usage respectively.