Moodle event observers “fire” asynchronously based on events that get triggered by user activity, and so… hard to catch and debug by simply passing the XDEBUG variable via the browser.
Enters… xdebug_break()
Moodle event observers “fire” asynchronously based on events that get triggered by user activity, and so… hard to catch and debug by simply passing the XDEBUG variable via the browser.
Enters… xdebug_break()
Webgrind is a Xdebug profiling web frontend in PHP. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick’n’dirty optimizations it does the job. Here’s a screenshot showing the output from profiling:
Suggestions for improvements and new features are more than welcome – this is just a start.
מקור: jokkedk/webgrind: Xdebug Profiling Web Frontend in PHP