MediaWiki
REL1_19
|
New debugger system that outputs a toolbar on page view. More...
Static Public Member Functions | |
static | addModules (OutputPage $out) |
Add ResourceLoader modules to the OutputPage object if debugging is enabled. | |
static | clearLog () |
Clears internal log array and deprecation tracking. | |
static | debugMsg ($str) |
This is a method to pass messages from wfDebug to the pretty debugger. | |
static | deprecated ($function, $version, $component) |
Adds a depreciation entry to the log, along with a backtrace. | |
static | getDebugHTML (IContextSource $context) |
Returns the HTML to add to the page for the toolbar. | |
static | getLog () |
Returns internal log array. | |
static | init () |
Enabled the debugger and load resource module. | |
static | log ($str) |
Adds a line to the log. | |
static | query ($sql, $function, $isMaster) |
Begins profiling on a database query. | |
static | queryTime ($id) |
Calculates how long a query took. | |
static | warning ($msg, $callerOffset=1) |
Adds a warning entry to the log. | |
Static Protected Member Functions | |
static | getFilesIncluded (IContextSource $context) |
Returns a list of files included, along with their size. | |
Static Protected Attributes | |
static | $debug = array() |
static | $deprecationWarnings = array() |
static | $enabled = false |
static | $log = array() |
static | $query = array() |
New debugger system that outputs a toolbar on page view.
By default, most methods do nothing ( self::$enabled = false ). You have to explicitly call MWDebug::init() to enabled them.
static MWDebug::addModules | ( | OutputPage $ | out | ) | [static] |
Add ResourceLoader modules to the OutputPage object if debugging is enabled.
$out | OutputPage |
Definition at line 63 of file Debug.php.
References OutputPage\addModules().
static MWDebug::clearLog | ( | ) | [static] |
Clears internal log array and deprecation tracking.
Definition at line 98 of file Debug.php.
Referenced by MWDebugTest\setUp().
static MWDebug::debugMsg | ( | $ | str | ) | [static] |
This is a method to pass messages from wfDebug to the pretty debugger.
Do NOT use this method, use MWDebug::log or wfDebug()
$str | string |
Definition at line 176 of file Debug.php.
Referenced by wfDebug().
static MWDebug::deprecated | ( | $ | function, |
$ | version, | ||
$ | component | ||
) | [static] |
Adds a depreciation entry to the log, along with a backtrace.
$function | |
$version | |
$component |
Definition at line 140 of file Debug.php.
References $version, Html\element(), Html\rawElement(), wfBacktrace(), and wfGetCaller().
Referenced by MWDebugTest\testAvoidDuplicateDeprecations(), MWDebugTest\testAvoidNonConsecutivesDuplicateDeprecations(), and wfDeprecated().
static MWDebug::getDebugHTML | ( | IContextSource $ | context | ) | [static] |
Returns the HTML to add to the page for the toolbar.
$context | IContextSource |
Definition at line 249 of file Debug.php.
References $wgRequestTime, $wgVersion, getFilesIncluded(), IContextSource\getLanguage(), IContextSource\getRequest(), Html\inlineScript(), log(), ResourceLoader\makeConfigSetScript(), and ResourceLoader\makeLoaderConditionalScript().
Referenced by Skin\generateDebugHTML().
static MWDebug::getFilesIncluded | ( | IContextSource $ | context | ) | [static, protected] |
Returns a list of files included, along with their size.
$context | IContextSource |
Definition at line 229 of file Debug.php.
References $file, $files, $size, and IContextSource\getLanguage().
Referenced by getDebugHTML().
static MWDebug::getLog | ( | ) | [static] |
Returns internal log array.
Definition at line 91 of file Debug.php.
References $log.
Referenced by MWDebugTest\testAddLog(), MWDebugTest\testAddWarning(), MWDebugTest\testAvoidDuplicateDeprecations(), and MWDebugTest\testAvoidNonConsecutivesDuplicateDeprecations().
static MWDebug::init | ( | ) | [static] |
Enabled the debugger and load resource module.
This is called by Setup.php when $wgDebugToolbar is true.
Definition at line 53 of file Debug.php.
Referenced by MWDebugTest\setUp().
static MWDebug::log | ( | $ | str | ) | [static] |
Adds a line to the log.
$str | string |
Definition at line 76 of file Debug.php.
References wfGetCaller().
Referenced by getDebugHTML(), MWDebugTest\testAddLog(), and MWDebugTest\testAvoidNonConsecutivesDuplicateDeprecations().
static MWDebug::query | ( | $ | sql, |
$ | function, | ||
$ | isMaster | ||
) | [static] |
static MWDebug::queryTime | ( | $ | id | ) | [static] |
Calculates how long a query took.
$id | int |
Definition at line 214 of file Debug.php.
Referenced by DatabaseBase\query().
static MWDebug::warning | ( | $ | msg, |
$ | callerOffset = 1 |
||
) | [static] |
Adds a warning entry to the log.
$msg | ||
int | $callerOffset |
Definition at line 110 of file Debug.php.
References wfGetCaller().
Referenced by MWDebugTest\testAddWarning(), MWDebugTest\testAvoidNonConsecutivesDuplicateDeprecations(), and wfWarn().
MWDebug::$deprecationWarnings = array() [static, protected] |
MWDebug::$log = array() [static, protected] |