This is an old revision of the document!
Table of Contents
Debug tools
Tools to easy the debugging in DokuWiki are provided, some needs the enabling of debug config.
Enable debugging
To provide more info for debugging DokuWiki has a config allowdebug that enable some debugging options. When enabled you can:
- Appending
&do=debug
so DokuWiki will output a huge list of debug strings. - Look up output of
dbglog()
indata/cache/debug.log
- Receive additional error messages e.g. from some authentication backends
Debug functions
dbg($msg)
Insert a code block in the wikipage filled by $msg as plain text.
Adding an extra argument to dbg($msg, $hidden=true)
will return the $msg as html comment.
dbglog($msg)
Writes $msg to the log in the cache directory data/cache/debug.log
when config allowdebug is enabled.
Use dbglog($msg, 'Header above log message')
for including a header above $msg.
dbg_backtrace()
Print a reversed, prettyprinted backtrace
debug_guard($data)
When you write your own debug functionality, use this function to remove all data from an array where the key seems to point to sensitive data.
See also
- dbg() in
inc/infoutils.php