Debug
class Debug (View source)
Supports debugging and core error handling.
Attaches custom methods to the default error handling hooks in PHP. Currently, two levels of error are supported:
- Notice
- Warning
- Error
Uncaught exceptions are currently passed to the debug reporter as standard PHP errors.
Errors handled by this class are passed along to SS_Log. For configuration information, see the SS_Log class documentation.
Methods
Show the contents of val in a debug-friendly way.
Close out the show dumper.
Get debug text for this object
Show a debugging message.
Create an instance of an appropriate DebugView object.
Determine if the given request supports html output
Check if the user has permissions to run URL debug tools, else redirect them to log in.
Details
static
show(mixed $val, bool $showHeader = true, HTTPRequest|null $request = null)
Show the contents of val in a debug-friendly way.
Debug::show() is intended to be equivalent to dprintr() Does not work on live mode.
static array
caller()
Returns the caller for a specific method
static
endshow(mixed $val, bool $showHeader = true, HTTPRequest|null $request = null)
Close out the show dumper.
Does not work on live mode
static
dump(mixed $val, HTTPRequest|null $request = null)
Quick dump of a variable.
Note: This method will output in live!
static string
text(mixed $val, HTTPRequest|null $request = null)
Get debug text for this object
static
message(string $message, bool $showHeader = true, HTTPRequest|null $request = null)
Show a debugging message.
Does not work on live mode
static DebugView
create_debug_view(HTTPRequest|null $request = null)
Create an instance of an appropriate DebugView object.
static protected bool
supportsHTML(HTTPRequest|null $request = null)
Determine if the given request supports html output
static
require_developer_login()
Check if the user has permissions to run URL debug tools, else redirect them to log in.