Debugger
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() |
| CookieSecret |
|
| VERSION |
|
| DEVELOPMENT |
|
| PRODUCTION |
|
| DETECT |
|
| COOKIE_SECRET |
|
| DEBUG |
for Debugger::log() |
| INFO |
for Debugger::log() |
| WARNING |
for Debugger::log() |
| ERROR |
for Debugger::log() |
| EXCEPTION |
for Debugger::log() |
| CRITICAL |
for Debugger::log() |
Properties
| static | $productionMode | in production mode is suppressed any debugging output |
|
| static | $showBar | whether to display debug bar in development mode |
|
| static | $reservedMemorySize | size of reserved memory |
|
| static ?array<int,array<string,mixed>> | $obStatus | ||
| static | $strictMode | determines whether any error will cause immediate death in development mode; if integer that it's matched against error severity |
|
| static | $scream | disables the @ (shut-up) operator so that notices and warnings are no longer hidden; if integer than it's matched against error severity |
|
| static | $onFatalError | ||
| static | $maxDepth | how many nested levels of array/object properties display by dump() |
|
| static | $maxLength | how long strings display by dump() |
|
| static | $maxItems | how many items in array/object display by dump() |
|
| static | $showLocation | display location by dump()? |
|
| static string[] | $keysToHide | ||
| static | $dumpTheme | theme for dump() |
|
| static | $maxLen | ||
| static | $logDirectory | name of the directory where errors should be logged |
|
| static | $logSeverity | log bluescreen in production mode for this error severity |
|
| static string|string[]|null | |||
| static | $time | timestamp with microseconds of the start of the request |
|
| static | $editor | URI pattern mask to open editor |
|
| static array<string,string> | $editorMapping | ||
| static | $browser | command to open browser (use 'start ""' in Windows) |
|
| static | $errorTemplate | custom static error template |
|
| static string[] | $customCssFiles | ||
| static string[] | $customJsFiles | ||
| static string[] | $transparentPaths |
Methods
Static class - cannot be instantiated.
Enables displaying or logging errors and exceptions.
Dispatches deferred Bar/BlueScreen assets for AJAX requests or redirect queues.
Renders loading
No description
Shutdown handler to catch fatal errors and render the Bar.
Handles PHP warnings and notices; converts recoverable errors to exceptions.
No description
No description
No description
No description
Dumps information about a variable in readable format.
Starts/stops stopwatch.
Dumps information about a variable in Tracy Debug Bar.
Logs message or exception.
No description
No description
No description
Detects debug mode by IP address.
No description
Details
at line 162
final
__construct()
Static class - cannot be instantiated.
at line 174
static void
enable(bool|string|array|null $mode = null, string|null $logDirectory = null, string|array|null $email = null)
Enables displaying or logging errors and exceptions.
at line 255
static void
dispatch()
Dispatches deferred Bar/BlueScreen assets for AJAX requests or redirect queues.
Must be called after session_start() when using NativeSession.
at line 264
static void
renderLoader()
Renders loading
at line 270
static bool
isEnabled()
No description
at line 280
static void
shutdownHandler()
| internal |
Shutdown handler to catch fatal errors and render the Bar.
at line 311
static void
exceptionHandler(Throwable $exception)
| internal |
Handles an uncaught exception by rendering or logging it.
at line 338
static bool
errorHandler(int $severity, string $message, string $file, int $line)
| internal |
Handles PHP warnings and notices; converts recoverable errors to exceptions.
at line 367
static void
removeOutputBuffers(bool $errorOccurred)
| internal |
No description
at line 388
static BlueScreen
getBlueScreen()
No description
at line 403
static Bar
getBar()
No description
at line 415
static void
setLogger(ILogger $logger)
No description
at line 421
static ILogger
getLogger()
No description
at line 434
static DevelopmentStrategy
getStrategy()
| internal |
No description
at line 447
static void
setSessionStorage(SessionStorage $storage)
No description
at line 458
static SessionStorage
getSessionStorage()
| internal |
No description
at line 484
static mixed
dump(mixed $var, bool $return = false)
Dumps information about a variable in readable format.
at line 525
static float
timer(string|null $name = null)
Starts/stops stopwatch.
at line 544
static mixed
barDump(mixed $var, string|null $title = null, array $options = [])
Dumps information about a variable in Tracy Debug Bar.
at line 572
static mixed
log(mixed $message, string $level = ILogger::INFO)
Logs message or exception.
at line 579
static Throwable|null
tryLog(mixed $message, string $level = ILogger::INFO)
| internal |
No description
at line 593
static void
addSourceMapper(callable $mapper)
| internal |
No description
at line 600
static array|null
mapSource(string $file, int $line)
No description
at line 616
static bool
detectDebugMode(string|array|null $list = null)
Detects debug mode by IP address.
at line 639
static array
detectTransparentPaths()
| internal |
No description