1version=pmwiki-2.2.109 ordered=1 urlencoded=1
2author=Petko
3charset=UTF-8
4csum=$EnableMarkupDiag
5ctime=1156512549
6name=PmWiki.DebugVariables
7rev=18
8targets=PmWiki.DebugVariables,Cookbook.Stopwatch,PmWiki.AvailableActions,PmWiki.BasicVariables
9text=(:Summary:variables useful for debugging:)%0a%0a:$AbortFunction:A custom function name replacing the built-in Abort() function. %0a:$EnableDiag:%0a>>indent%3c%3c%0a(:include AvailableActions#BEGENABLEDIAG#ENDENABLEDIAG:)%0a>>%3c%3c%0a%0a:$EnableMarkupDiag:By default, the "ruleset" action will display all markup rules, and the old-format patterns requiring update for PHP 7 will list with their files and line numbers. Setting $EnableMarkupDiag to 1 will list files and line numbers of all patterns. Note, this needs to be set early in config.php before a Markup() call or before including a recipe.%0a%0a:$EnableIMSCaching:A variable which, when set equal to 1, recognizes the "If-Modified-Since" header coming from browsers and allows browsers to use locally cached pages.  Disabled by default to help the administrator customize its page without needing permanent reloading.%0a%0a:$EnableStopWatch:This activates an internal stopwatch that shows how long it takes to render a page. (If you have a wiki that composes a HTML page from multiple pages, such as a normal layout with a sidebar, you'll get separate timings for each subpage and for the total page.)%0a%0a: :The timings can be displayed by adding [@%3c!--function:StopWatchHTML 1-->@] in the wiki template.%0a%0a: :Valid values are:%0a        $EnableStopWatch = 0; # No timings (the default). No HTML will be generated.%0a        $EnableStopWatch = 1; # Wall-clock timings only.%0a        $EnableStopWatch = 2; # Wall-clock and CPU usage timings. Won't work on Windows.%0a%0a: :See [[(Cookbook:)Stopwatch]] for more details.%0a%0aSee also:%0a* [[AvailableActions#refcount|scripts/refcount.php]] is useful for debugging%0a%0a%0a----%0a>>faq%3c%3c[[#faq]]%0aQ:Is it possible for someone with admin priviledges to always have access to debugging tools, without letting everyone else access them?%0aA:You can easily & automatically allow debugging for anyone with admin priviledges (meanwhile leaving it off for everyone else) by including this line in config.php - ''just be sure that 1) $EnableDiag is either null or set to 0, and 2) to include it near the end of config.php, AFTER declaring your passwords, and after any AuthUser or other priviledge settings'':%0a%0a-->@@if (CondAuth($pagename, 'admin')) $EnableDiag = 1;  # allows admin to always call phpinfo, etc@@%0a%0a>>%3c%3c%0a
10time=1531569167
11