Debug
class Debug (View source)
The Debug class holds all methods to help debugging while development.
The output of all the contained methods can be activated/deactivated with defining the AM_DEBUG_ENABLED constant. All logged information will be stored in $buffer as JS's console.log() items.
Properties
static private | $buffer | Log buffer. | |
static private | $time | Timestamp when script started. |
Methods
Stop timer, calculate execution time, get user & server constants and return a console log item for every item in the buffer array.
Enable full error reporting, when debugging is enabled.
Return the buffer array.
Log any kind of variable and append it to the $buffer array.
Provide info about memory usage.
Start the timer on the first call to calculate the execution time when consoleLog() gets called.
Stop the timer and log the execution time.
Log all user constants for get_defined_constants().
Details
at line 67
static string
consoleLog()
Stop timer, calculate execution time, get user & server constants and return a console log item for every item in the buffer array.
at line 99
static
errorReporting()
Enable full error reporting, when debugging is enabled.
at line 110
static array
getLog()
Return the buffer array.
at line 120
static
log(mixed $element, string $description = '')
Log any kind of variable and append it to the $buffer array.
at line 154
static private
memory()
Provide info about memory usage.
at line 161
static private
timerStart()
Start the timer on the first call to calculate the execution time when consoleLog() gets called.
at line 172
static private
timerStop()
Stop the timer and log the execution time.
at line 182
static private
uc()
Log all user constants for get_defined_constants().