PHP frontend for Xdebug profiling?

Share this article

Has anyone put together a PHP front-end for viewing Xdebug 2.x’s profiling output yet?

Xdebug 1.x had this nice xdebug_dump_function_profile() function which planted a HTML table containing the profiling stats in your output – nice an easy to use, ignoring the minor issue that doing this “in band” with the code you are profiling slants the results. With Xdebug 2.x it was dropped and you now need a tool like kcachegrind or wincachegrind, an output file generated by Xdebug acting as the middle man.

The format of the profile output file is fairly straightforward (in fact the wincachegrind developer provides a nice short summary with the install README). Perhaps the trickier issue is how to deal with large files. And this could be a valid reason to use some AJAX… In fact it’s tempting to take a shot using wxpython (the book is out BTW – and it’s good) and put together a cross platform front end, but that’s another story.

Or do I need to do it myself ? ;)

Side note: the definitive Xdebug tutorial – http://derickrethans.nl/files/phparch-xdebug-qa.pdf

Harry FuecksHarry Fuecks
View Author

Harry Fuecks is the Engineering Project Lead at Tamedia and formerly the Head of Engineering at Squirro. He is a data-driven facilitator, leader, coach and specializes in line management, hiring software engineers, analytics, mobile, and marketing. Harry also enjoys writing and you can read his articles on SitePoint and Medium.

Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week