class Debugger

Debugger: displays and logs errors.

Constants

VERSION

DEVELOPMENT

server modes for Debugger::enable()

PRODUCTION

server modes for Debugger::enable()

DETECT

server modes for Debugger::enable()

COOKIE_SECRET

DEBUG

for Debugger::log() and Debugger::fireLog()

INFO

for Debugger::log() and Debugger::fireLog()

WARNING

for Debugger::log() and Debugger::fireLog()

ERROR

for Debugger::log() and Debugger::fireLog()

EXCEPTION

for Debugger::log() and Debugger::fireLog()

CRITICAL

for Debugger::log() and Debugger::fireLog()

Properties

static bool $productionMode
static bool $showBar
static bool $showFireLogger
static int $reservedMemorySize
static bool|int $strictMode
static bool $scream
static callable[] $onFatalError
static $maxDepth
static $maxLength
static $showLocation
static $maxLen
static string|null $logDirectory
static int $logSeverity
static string|array $email
static int $time
static string $editor
static array $editorMapping
static string $browser
static string $errorTemplate
static string[] $customCssFiles
static string[] $customJsFiles

Methods

__construct()

Static class - cannot be instantiated.

static void
enable(bool|string|string[] $mode = null, string $logDirectory = null, string|array $email = null)

Enables displaying or logging errors and exceptions.

static void
dispatch()

No description

static void
renderLoader()

Renders loading

<

script>

static bool
isEnabled()

No description

static void
shutdownHandler()

Shutdown handler to catch fatal errors and execute of the planned activities.

static void
exceptionHandler(Throwable $exception)

Handler to catch uncaught exception.

static bool|null
errorHandler(int $severity, string $message, string $file, int $line, array $context = null)

Handler to catch warnings and notices.

static BlueScreen
getBlueScreen()

No description

static Bar
getBar()

No description

static void
setLogger(ILogger $logger)

No description

static ILogger
getLogger()

No description

static ILogger
getFireLogger()

No description

static 
dump($var, bool $return = false) deprecated

No description

static float
timer(string $name = null)

Starts/stops stopwatch.

static mixed
barDump($var, string $title = null, array $options = [])

Dumps information about a variable in Tracy Debug Bar.

static mixed
log($message, string $level = ILogger::INFO)

Logs message or exception.

static bool
fireLog(mixed $message)

Sends message to FireLogger console.

static bool
detectDebugMode(string|array $list = null)

Detects debug mode by IP address.

Details

at line 140
final __construct()

Static class - cannot be instantiated.

at line 152
static void enable(bool|string|string[] $mode = null, string $logDirectory = null, string|array $email = null)

Enables displaying or logging errors and exceptions.

Parameters

bool|string|string[] $mode use constant Debugger::PRODUCTION, DEVELOPMENT, DETECT (autodetection) or IP address(es) whitelist.
string $logDirectory error log directory
string|array $email administrator email; enables email sending in production mode

Return Value

void

at line 215
static void dispatch()

Return Value

void

at line 244
static void renderLoader()

Renders loading

<

script>

Return Value

void

at line 252
static bool isEnabled()

Return Value

bool

at line 262
static void shutdownHandler()

Shutdown handler to catch fatal errors and execute of the planned activities.

Return Value

void

at line 289
static void exceptionHandler(Throwable $exception)

Handler to catch uncaught exception.

Parameters

Throwable $exception

Return Value

void

at line 359
static bool|null errorHandler(int $severity, string $message, string $file, int $line, array $context = null)

Handler to catch warnings and notices.

Parameters

int $severity
string $message
string $file
int $line
array $context

Return Value

bool|null false to call normal error handler, null otherwise

Exceptions

ErrorException

at line 445
static BlueScreen getBlueScreen()

Return Value

BlueScreen

at line 459
static Bar getBar()

Return Value

Bar

at line 471
static void setLogger(ILogger $logger)

Parameters

ILogger $logger

Return Value

void

at line 477
static ILogger getLogger()

Return Value

ILogger

at line 488
static ILogger getFireLogger()

Return Value

ILogger

at line 504
static dump($var, bool $return = false) deprecated

deprecated use dump()

Parameters

$var
bool $return

at line 521
static float timer(string $name = null)

Starts/stops stopwatch.

Parameters

string $name

Return Value

float elapsed seconds

at line 537
static mixed barDump($var, string $title = null, array $options = [])

Dumps information about a variable in Tracy Debug Bar.

Parameters

$var
string $title
array $options

Return Value

mixed variable itself

at line 560
static mixed log($message, string $level = ILogger::INFO)

Logs message or exception.

Parameters

$message
string $level

Return Value

mixed

at line 570
static bool fireLog(mixed $message)

Sends message to FireLogger console.

Parameters

mixed $message

Return Value

bool

at line 582
static bool detectDebugMode(string|array $list = null)

Detects debug mode by IP address.

Parameters

string|array $list IP addresses or computer names whitelist detection

Return Value

bool