Debug toolbar
With $padToolbar = 'local' every web page of a local request carries a collapsible bar at its foot: what the engine collected while it rendered the page. This page switches it on for itself, so opened on your own machine the bar stands below.
|
PHP fragments/toolbar_1.php |
HTML fragments/toolbar_1.pad |
Result |
|---|---|---|
|
|
red green |
The fragment shows the setting in a page's PHP; an application sets it once in _config/config.php.
What it shows
- The summary - application and page, the time and peak memory, how many levels the engine opened, how many SQL statements ran, and whether the page cache was off, hit or missed; fragment cache hits and misses when there were any.
- Request - the same figures with the size of the output.
- Tags - the tag tree: every tag that opened a level, indented by its depth, with its type.
- SQL - every statement, in the order it ran.
-
Templates - the template files read: wrappers, the page, snippets, the
.padhalves of tags. - Variables and Session - the application's own variables and the session, credentials redacted.
Who sees it
Only a local request: the command line, or this machine asking itself with nothing forwarded - the same test the full error report uses, and $padDiagnostics = FALSE closes it the same way. A visitor never gets it, whatever the setting. It is left out of a bare fragment (&padInclude), of anything that is not an HTML page answering 200, and of the page cache: it is added on the way out, after the cache stored the page.