Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • Bar
  • BlueScreen
  • Debugger
  • Dumper
  • FireLogger
  • Helpers
  • Logger
  • OutputDebugger

Interfaces

  • IBarPanel
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

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)

Direct known subclasses

Nette\Diagnostics\Debugger
Namespace: Tracy
Author: David Grudl
Located at Tracy/Debugger.php
Methods summary
final public
# __construct( )

Static class - cannot be instantiated.

Static class - cannot be instantiated.

public static
# enable( mixed $mode = NULL, string $logDirectory = NULL, string $email = NULL )

Enables displaying or logging errors and exceptions.

Enables displaying or logging errors and exceptions.

Parameters

$mode
mixed
production, development mode, autodetection or IP address(es) whitelist.
$logDirectory
string
error log directory; enables logging in production mode, FALSE means that logging is disabled
$email
string
administrator email; enables email sending in production mode
public static Tracy\BlueScreen
# getBlueScreen( )

Returns

Tracy\BlueScreen
public static Tracy\Bar
# getBar( )

Returns

Tracy\Bar
public static
# setLogger( $logger )
public static Tracy\Logger
# getLogger( )

Returns

Tracy\Logger
public static Tracy\FireLogger
# getFireLogger( )

Returns

Tracy\FireLogger
public static boolean
# isEnabled( )

Is Debug enabled?

Is Debug enabled?

Returns

boolean
public static string
# log( string|Exception $message, integer $priority = Tracy\Debugger::INFO )

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

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

Parameters

$message
string|Exception
$priority
integer
one of constant Debugger::INFO, WARNING, ERROR (sends email), EXCEPTION (sends email), CRITICAL (sends email)

Returns

string
logged error filename
public static mixed
# dump( mixed $var, boolean $return = FALSE )

Dumps information about a variable in readable format.

Dumps information about a variable in readable format.

Parameters

$var
mixed
variable to dump
$return
boolean
return output instead of printing it? (bypasses $productionMode)

Returns

mixed
variable itself or dump

TracySkipLocation

public static float
# timer( string $name = NULL )

Starts/stops stopwatch.

Starts/stops stopwatch.

Parameters

$name
string
name

Returns

float
elapsed seconds
public static mixed
# barDump( mixed $var, string $title = NULL, array $options = NULL )

Dumps information about a variable in Tracy Debug Bar.

Dumps information about a variable in Tracy Debug Bar.

Parameters

$var
mixed
variable to dump
$title
string
optional title
$options
array
dumper options

Returns

mixed
variable itself

TracySkipLocation

public static boolean
# fireLog( mixed $message )

Sends message to FireLogger console.

Sends message to FireLogger console.

Parameters

$message
mixed
message to log

Returns

boolean
was successful?
Constants summary
string VERSION '2.2.9'
#
boolean DEVELOPMENT FALSE
#

server modes Tracy\Debugger::enable()

server modes Tracy\Debugger::enable()

boolean PRODUCTION TRUE
#

server modes Tracy\Debugger::enable()

server modes Tracy\Debugger::enable()

DETECT NULL
#

server modes Tracy\Debugger::enable()

server modes Tracy\Debugger::enable()

string DEBUG 'debug'
#

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

string INFO 'info'
#

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

string WARNING 'warning'
#

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

string ERROR 'error'
#

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

string EXCEPTION 'exception'
#

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

string CRITICAL 'critical'
#

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Tracy\Debugger::log() and Tracy\Debugger::fireLog()

Properties summary
public static string $version Tracy\Debugger::VERSION
#

Deprecated

public static boolean $productionMode Tracy\Debugger::DETECT
#

in production mode is suppressed any debugging output

in production mode is suppressed any debugging output

public static integer $time
#

timestamp with microseconds of the start of the request

timestamp with microseconds of the start of the request

public static string $source
#

requested URI or command line

requested URI or command line

public static string $editor 'editor://open/?file=%file&line=%line'
#

URI pattern mask to open editor

URI pattern mask to open editor

public static string $browser
#

command to open browser (use 'start ""' in Windows)

command to open browser (use 'start ""' in Windows)

public static integer $maxDepth 3
#

how many nested levels of array/object properties display Tracy\Debugger::dump()

how many nested levels of array/object properties display Tracy\Debugger::dump()

public static integer $maxLen 150
#

how long strings display Tracy\Debugger::dump()

how long strings display Tracy\Debugger::dump()

public static boolean $showLocation FALSE
#

display location? Tracy\Debugger::dump()

display location? Tracy\Debugger::dump()

public static boolean|integer $strictMode FALSE
#

determines whether any error will cause immediate death; if integer that it's matched against error severity

determines whether any error will cause immediate death; if integer that it's matched against error severity

public static boolean $scream FALSE
#

disables the @ (shut-up) operator so that notices and warnings are no longer hidden

disables the @ (shut-up) operator so that notices and warnings are no longer hidden

public static array $onFatalError array()
#

of callables specifies the functions that are automatically called after fatal error

of callables specifies the functions that are automatically called after fatal error

public static string $logDirectory
#

name of the directory where errors should be logged

name of the directory where errors should be logged

public static integer $logSeverity 0
#

log bluescreen in production mode for this error severity

log bluescreen in production mode for this error severity

public static string|array $email
#

email(s) to which send error notifications

email(s) to which send error notifications

public static array $mailer array('Tracy\Logger', 'defaultMailer')
#

Deprecated

public static integer $emailSnooze 172800
#

Deprecated

Nette 2.2 API documentation generated by ApiGen 2.8.0