Diff for Doc/Dev/Debug between 7 and 8

+ Debugging Tools For Horde 4 or later

++ Horde::debug() [http://lists.horde.org/archives/dev/Week-of-Mon-20110321/025987.html]

To easily debug the value of a variable in Horde PHP code, Horde::debug() can be used.  Usage:

<code type="php">

{{$variable}} is the variable you wish to debug.  The contents of this variable will be dumped into a file named {{horde_debug.txt}} in your temporary directory (generally set in {{horde/config/conf.php}} in the {{$conf['tmpdir']}} variable).  ##red|$variable MUST NOT be debug_backtrace().##

If you want to manually specify the location of the debug file, you can use the optional second parameter to Horde::debug():

<code type="php">
Horde::debug($variable, $filename);

{{$filename}} should be the full path to the filename.  If using {{$filename}}, make sure the directory/file is writable by the user the PHP process runs as.

++ IMP: IMAP/POP3 Debugging

To enable debugging, see instructions contained in {{imp/config/backends.php}} (the 'debug' config parameter).

++ General Debugging Tools

There are many general purpose debugging tools that can be used to debug Horde code. Tools that the developers include, but are not limited to:

* [http://xdebug.org/ Xdebug]: The standard debugging extension for PHP. Beside a few developer niceties, it allows for runtime debugging with breakpoint, step-by-step debugging, introspection, etc. Goes along with browser and IDE extensions like:
  ** Emacs extension "geben": http://code.google.com/p/geben-on-emacs/
 * Firefox extension "Easy Xdebug": http://www.elime.be/easyxdebug.htm
* [http://www.wireshark.org/ Wireshark]: Especially useful for debugging HTTP-based request to and from the Horde code.