Batang alat awakutu

Jump to navigation Jump to search
This page is a translated version of the page Debugging toolbar and the translation is 13% complete.
Other languages:
Bahasa Indonesia • ‎English • ‎Nederlands • ‎Türkçe • ‎español • ‎français • ‎polski • ‎sicilianu • ‎русский • ‎中文 • ‎日本語

"Batang alat awakutu" adalah sebuah peralatan untuk para pengembang yang memperlihatkan informasi awakutu tentang sebuah halaman MediaWiki di bagian bawah jendela peramban. Anda dapat mengaktifkannya dengan variabel $wgDebugToolbar di "LocalSettings.php":

$wgDebugToolbar = true;

The toolbar

The toolbar consists of multiple sections that you click to expand or collapse:


The sections are:

An area where MediaWiki code can write messages. Superior to echoing text to the browser.
A list of SQL queries executed on that page, with timing (requires $wgDebugDumpSql ).
Debug log
A list of the debug messages printed during the page execution.
HTTP request information.
PHP includes
A list of included PHP files during the page execution.
The rest
Statistics about the software versions, execution time, and memory used.

Click any section to expand it and see the data. Click it again to close. Use your browser's Find feature to search the data.

The MediaWiki and PHP links lead to their respective websites ( and

Logging messages to the console

See the file includes/debug/MWDebug.php for available functions. Here are a few useful examples:

Must be called first to enable most other functions
MWDebug::log('your message here')
Send an arbitrary message to the Console
MWDebug::warning('Never do that again')
Send a warning message to the Console
MWDebug::deprecated('Function Foobar() is dead')
Send a message to the Console about deprecated functionality, including a backtrace
MWDebug::queryTime(MWDebug::query('select foo from bar'));
Execute the given SQL and report its time in the Queries section.