class Debug

Constants

DEBUG_FUNCTION_TEMPLATE

DEBUG_FUNCTION_QUERY_PROFILER

DEBUG_FUNCTION_TIME_PROFILER

DEBUG_FUNCTION_QUERY_PROFILER_EXTENDED

Properties

static string $DEBUG_FUNCTION
$enable_output
$enable_debugging
$forced_debugging
$starttime
$timer_section_start
$timer_section_items
$enabled_debug_functions
$debug_functions
static $haltOnBreakpoint

Methods

__construct()

No description

static string
backtrace(bool $return = false, int $limit = 50, bool $show_source = true, $trace = false)

Print/Return backtrace in readable format

static 
console(array|object $values)

Function for silent mode stream output directly to your Browser debug console

count(string $name)

No description

static 
dd(array|object $values)

Function to debug on live systems and die

disable()

Disable Debbuging

disableDebugFunction($functionId)

No description

disableDebugging()

No description

static 
display_error_page($message, $show_backtrace = true, $page_output = False, $error_details = false)

Output error page with debugging infos

static 
dump(array|object $values)

Function to debug on live systems

dumpDebugFile($level = 'low')

Dumps all collected DEBUG data to a file located at /_file/debug/ and the Request ID as folder name

enableDebugFunction($functionId)

Enable a certain debugging feature

enableDebugging()

No description

enableTimeProfiling()

Enables timing sections throughout the framework with query counts.

endSection($type)

Stops a time section. Pass $type to sum multiple sections up, e.g. all sections of type 'query' will result in a sum

getLastQueryProfilerResult($returnOnlyQueries = true, $returnSingleLines = true)

No description

getTimerSections()

No description

array
getTimerStats()

Returns an array containing the aggregated timer statistics

int
get_execution_time()

No description

static array
get_previous_call(mixed $steps_back = 1)

Returns an array with the last step

static 
get_sourcecode_line($file, $line, $neighbor_line_count = 3, $show_source = true)

No description

static 
haltOnNextBreakpoint()

If called the execution will stop on the next setBreakpoint() call and prints the passed output

bool
is_enabled(string $p)

Checks wether a certain debug flag has been enabled (for sub-debug functions)

log($message = false, $priority = LOG_DEBUG, $type = 'SYSTEM', $file = false, $line = false)

No description

onAfterGetPage()

Output data on page exit

static 
print_a()

No description

print_counts()

No description

register_debug_function(string $id, string $caption)

Register an additional debug function for this call. Use is_enabled() to check wether the function is enabled or not

resetSectionData()

No description

runtime(mixed $object = false, mixed $function = false, mixed $params = false, mixed $runs = 1)

Measuring run time of: {$function} [of {$object}] is called {$runs} times with given {$params}.

static 
setBreakpoint(mixed $debug_output)

Sets a breakpoint where the execution will be halted in case of a prior haltOnNextBreakpoint() activation This can be used if you need to debug code which is being executed from various paths but you need to debug it in a specific run path. Simply call haltOnNextBreakpoint() and the next time the setBreakpoint() is reached your debug output will be shown

string
show_debug_toolbar(bool $return = true)

No description

startQueryProfiler($useExtendedProfile = false)

No description

startSection(string $type = 'none')

No description

start_timer(bool $force_reset = false)

No description

stopQueryProfiler()

No description

Details

at line 49
__construct()

No description

at line 326
static string backtrace(bool $return = false, int $limit = 50, bool $show_source = true, $trace = false)

Print/Return backtrace in readable format

Parameters

bool $return

Set to true if you need the return

int $limit

Number of backtrace steps to view

bool $show_source
$trace

Return Value

string

at line 1391
static console(array|object $values)

Function for silent mode stream output directly to your Browser debug console

Parameters

array|object $values

you want to dump

at line 638
count(string $name)

No description

Parameters

string $name

of the counter

at line 1377
static dd(array|object $values)

Function to debug on live systems and die

using symfony dump function and die Debug::$DEBUG_FUNCTION = 'dump'; Debug::dd($max_param);

Parameters

array|object $values

you want to dump

at line 488
disable()

Disable Debbuging

at line 151
disableDebugFunction($functionId)

No description

Parameters

$functionId

at line 113
disableDebugging()

No description

at line 180
static display_error_page($message, $show_backtrace = true, $page_output = False, $error_details = false)

Output error page with debugging infos

Parameters

$message
$show_backtrace
$page_output
$error_details

at line 1349
static dump(array|object $values)

Function to debug on live systems

using symfony dump function Debug::$DEBUG_FUNCTION = 'dump'; Debug::dump($max_param);

Parameters

array|object $values

you want to dump

at line 619
dumpDebugFile($level = 'low')

Dumps all collected DEBUG data to a file located at /_file/debug/ and the Request ID as folder name

Parameters

$level

at line 147
enableDebugFunction($functionId)

Enable a certain debugging feature

Parameters

$functionId

at line 109
enableDebugging()

No description

at line 159
enableTimeProfiling()

Enables timing sections throughout the framework with query counts.

at line 565
endSection($type)

Stops a time section. Pass $type to sum multiple sections up, e.g. all sections of type 'query' will result in a sum

Parameters

$type

at line 131
getLastQueryProfilerResult($returnOnlyQueries = true, $returnSingleLines = true)

No description

Parameters

$returnOnlyQueries
$returnSingleLines

at line 588
getTimerSections()

No description

at line 601
array getTimerStats()

Returns an array containing the aggregated timer statistics

Return Value

array

at line 534
int get_execution_time()

No description

Return Value

int

time

at line 167
static array get_previous_call(mixed $steps_back = 1)

Returns an array with the last step

Parameters

mixed $steps_back

Return Value

array

at line 403
static get_sourcecode_line($file, $line, $neighbor_line_count = 3, $show_source = true)

No description

Parameters

$file
$line
$neighbor_line_count
$show_source

at line 1418
static haltOnNextBreakpoint()

If called the execution will stop on the next setBreakpoint() call and prints the passed output

at line 466
bool is_enabled(string $p)

Checks wether a certain debug flag has been enabled (for sub-debug functions)

Parameters

string $p

SubFunction Identifier

Return Value

bool

at line 509
log($message = false, $priority = LOG_DEBUG, $type = 'SYSTEM', $file = false, $line = false)

No description

Parameters

$message
$priority
$type
$file
$line

at line 99
onAfterGetPage()

Output data on page exit

at line 455
static print_a()

No description

at line 647
print_counts()

No description

at line 480
register_debug_function(string $id, string $caption)

Register an additional debug function for this call. Use is_enabled() to check wether the function is enabled or not

Parameters

string $id

Function identifier, will be passed to is_enabled()

string $caption

Caption to display in debug menu

at line 592
resetSectionData()

No description

at line 1299
runtime(mixed $object = false, mixed $function = false, mixed $params = false, mixed $runs = 1)

Measuring run time of: {$function} [of {$object}] is called {$runs} times with given {$params}.

Parameters

mixed $object
mixed $function
mixed $params
mixed $runs

at line 1429
static setBreakpoint(mixed $debug_output)

Sets a breakpoint where the execution will be halted in case of a prior haltOnNextBreakpoint() activation This can be used if you need to debug code which is being executed from various paths but you need to debug it in a specific run path. Simply call haltOnNextBreakpoint() and the next time the setBreakpoint() is reached your debug output will be shown

Parameters

mixed $debug_output

string or Array which should be printed for debug purposes

at line 660
string show_debug_toolbar(bool $return = true)

No description

Parameters

bool $return

Set to true if you need the HTML Output returned

Return Value

string

at line 117
startQueryProfiler($useExtendedProfile = false)

No description

Parameters

$useExtendedProfile

at line 551
startSection(string $type = 'none')

No description

Parameters

string $type

Identifier used for summarized displays. Use syntax as [MODULE].[FUNCTION].[SECTION], e.g. lookbook.get_user.prepare

at line 521
start_timer(bool $force_reset = false)

No description

Parameters

bool $force_reset

force restart

at line 126
stopQueryProfiler()

No description