class Debugger

Debugger: displays and logs errors.

Behavior is determined by two factors: mode & output

  • modes: production / development
  • output: HTML / AJAX / CLI / other (e.g. XML)

Constants

VERSION

DEVELOPMENT

server modes Debugger::enable()

PRODUCTION

server modes Debugger::enable()

DETECT

server modes Debugger::enable()

DEBUG

Debugger::log()} and {@link Debugger::fireLog()

INFO

Debugger::log()} and {@link Debugger::fireLog()

WARNING

Debugger::log()} and {@link Debugger::fireLog()

ERROR

Debugger::log()} and {@link Debugger::fireLog()

EXCEPTION

Debugger::log()} and {@link Debugger::fireLog()

CRITICAL

Debugger::log()} and {@link Debugger::fireLog()

Properties

static deprecated $version
static bool $productionMode
static int $time
static string $source
static string $editor
static string $browser
static int $maxDepth
static int $maxLen
static bool $showLocation
static bool|int $strictMode
static bool $scream
static array $onFatalError
static internal $errorTypes
static string $logDirectory
static int $logSeverity
static string|array $email
static deprecated $mailer
static deprecated $emailSnooze

Methods

__construct()

Static class - cannot be instantiated.

static void
enable($mode = NULL, $logDirectory = NULL, $email = NULL)

Enables displaying or logging errors and exceptions.

static BlueScreen
getBlueScreen()

No description

static Bar
getBar()

No description

static void
setLogger($logger)

No description

static Logger
getLogger()

No description

static FireLogger
getFireLogger()

No description

static bool
isEnabled()

Is Debug enabled?

static string
log($message, $priority = self::INFO)

Logs message or exception to file (if not disabled) and sends email notification (if enabled).

static void
_shutdownHandler()

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

static void
_exceptionHandler($exception, $exit = TRUE)

Handler to catch uncaught exception.

static bool
_errorHandler($severity, $message, $file, $line, $context)

Handler to catch warnings and notices.

static mixed
dump($var, $return = FALSE)

Dumps information about a variable in readable format.

static float
timer($name = NULL)

Starts/stops stopwatch.

static mixed
barDump($var, $title = NULL, array $options = NULL)

Dumps information about a variable in Tracy Debug Bar.

static bool
fireLog($message)

Sends message to FireLogger console.

Details

at line 140
final __construct()

Static class - cannot be instantiated.

at line 153
static void enable($mode = NULL, $logDirectory = NULL, $email = NULL)

Enables displaying or logging errors and exceptions.

Parameters

$mode
$logDirectory
$email

Return Value

void

at line 221
static BlueScreen getBlueScreen()

No description

Return Value

BlueScreen

at line 238
static Bar getBar()

No description

Return Value

Bar

at line 259
static void setLogger($logger)

No description

Parameters

$logger

Return Value

void

at line 268
static Logger getLogger()

No description

Return Value

Logger

at line 284
static FireLogger getFireLogger()

No description

Return Value

FireLogger

at line 297
static bool isEnabled()

Is Debug enabled?

Return Value

bool

at line 309
static string log($message, $priority = self::INFO)

Logs message or exception to file (if not disabled) and sends email notification (if enabled).

Parameters

$message
$priority

Return Value

string

logged error filename

at line 369
static void _shutdownHandler()

internal  
 

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

Return Value

void

at line 391
static void _exceptionHandler($exception, $exit = TRUE)

internal  
 

Handler to catch uncaught exception.

Parameters

$exception
$exit

Return Value

void

at line 476
static bool _errorHandler($severity, $message, $file, $line, $context)

internal  
 

Handler to catch warnings and notices.

Parameters

$severity
$message
$file
$line
$context

Return Value

bool

FALSE to call normal error handler, NULL otherwise

Exceptions

ErrorException

at line 536
static mixed dump($var, $return = FALSE)

Dumps information about a variable in readable format.

Parameters

$var
$return

Return Value

mixed

variable itself or dump

at line 563
static float timer($name = NULL)

Starts/stops stopwatch.

Parameters

$name

Return Value

float

elapsed seconds

at line 581
static mixed barDump($var, $title = NULL, array $options = NULL)

Dumps information about a variable in Tracy Debug Bar.

Parameters

$var
$title
array $options

Return Value

mixed

variable itself

at line 599
static bool fireLog($message)

Sends message to FireLogger console.

Parameters

$message

Return Value

bool

was successful?