2011-07-09 08:13:10 +02:00
|
|
|
@title Using DarkConsole
|
|
|
|
@group developer
|
|
|
|
|
|
|
|
Enabling and using the built-in debugging console.
|
|
|
|
|
|
|
|
= Overview =
|
|
|
|
|
|
|
|
DarkConsole is a debugging console built into Phabricator which exposes
|
|
|
|
configuration, performance and error information. It can help you detect,
|
|
|
|
understand and resolve bugs and performance problems in Phabricator
|
|
|
|
applications.
|
|
|
|
|
|
|
|
DarkConsole was originally implemented as part of the Facebook Lite site;
|
|
|
|
its name is a bit of play on that (and a reference to the dark color palette
|
|
|
|
its design uses).
|
|
|
|
|
2013-03-22 19:54:49 +01:00
|
|
|
= Warning =
|
2011-07-09 08:13:10 +02:00
|
|
|
|
|
|
|
Because DarkConsole exposes some configuration and debugging information, it is
|
|
|
|
disabled by default (and **you should not enable it in production**). It has
|
2013-03-22 19:54:49 +01:00
|
|
|
some simple safeguards to prevent leaking credential information, but enabling
|
|
|
|
it in production may compromise the integrity of an install.
|
|
|
|
|
|
|
|
= Enabling DarkConsole =
|
2011-07-09 08:13:10 +02:00
|
|
|
|
2013-03-22 19:54:49 +01:00
|
|
|
You enable DarkConsole in your configuration, by setting `darkconsole.enabled`
|
|
|
|
to `true`, and then turning it on in `Settings` -> `Display Preferences`.
|
2011-07-09 08:42:37 +02:00
|
|
|
Once DarkConsole is enabled, you can show or hide it by pressing ##`## on your
|
|
|
|
keyboard.
|
|
|
|
|
2013-03-22 19:54:49 +01:00
|
|
|
Since the setting is not available to logged-out users, you can also set
|
|
|
|
`darkconsole.always-on` if you need to access DarkConsole on logged-out pages.
|
2011-07-09 08:42:37 +02:00
|
|
|
|
|
|
|
DarkConsole has a number of tabs, each of which is powered by a "plugin". You
|
|
|
|
can use them to access different debugging and performance features.
|
|
|
|
|
|
|
|
= Plugin: Error Log =
|
|
|
|
|
|
|
|
The "Error Log" plugin shows errors that occurred while generating the page,
|
|
|
|
similar to the httpd ##error.log##. You can send information to the error log
|
|
|
|
explicitly with the @{function@libphutil:phlog} function.
|
|
|
|
|
|
|
|
If errors occurred, a red dot will appear on the plugin tab.
|
|
|
|
|
|
|
|
= Plugin: Request =
|
|
|
|
|
|
|
|
The "Request" plugin shows information about the HTTP request the server
|
|
|
|
received, and the server itself.
|
|
|
|
|
|
|
|
= Plugin: Services =
|
|
|
|
|
|
|
|
The "Services" plugin lists calls a page made to external services, like
|
|
|
|
MySQL and the command line.
|
|
|
|
|
|
|
|
= Plugin: XHProf =
|
|
|
|
|
|
|
|
The "XHProf" plugin gives you access to the XHProf profiler. To use it, you need
|
|
|
|
to install the corresponding PHP plugin -- see instructions in the
|
|
|
|
@{article:Installation Guide}. Once it is installed, you can use XHProf to
|
|
|
|
profile the runtime performance of a page.
|