Debugging
Engine::getStatus and Engine:getStatusHumanReadable will give you a hash array with detailed information on Cherrycake, the loaded modules, the mapped actions and some benchmarks.
Note that the status information will be incomplete if the
isDevel
engine option is not set to true.
For a convenient way of getting the status of the engine, just use the Engine:getStatusHtml method at the desired point in your code, like this:
This will give show you a status report like this:
A more usual way of using Engine:getStatusHtml is to call it after all execution has been done, and just before the engine is about to end. Here's a way to do it in your /public/index.php
file:
Here's some interesting information you'll find in the output of Engine:getStatusHtml:
runningHrTime
The amount of time it took PHP to run the current request, up to the point where you called the getStatus method.moduleLoadingHistory
The list of modules that were loaded when you called the getStatus method, in the order they were loaded, and including this extra information:Whether the module was loaded as a base module, as a dependency of another module or programmatically.
The point in time after the execution started where the module was loaded.
The amount of time it took the module to load and init, including loading any other module dependencies.
mappedActions
The list of mapped actions when you called the getStatus method, including the module::class they call, their route and the parameters they accept.
Last updated