\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{Debugging Tools For Horde 4 or later}
\section{Horde::debug() <a href="http://lists.horde.org/archives/dev/Week-of-Mon-20110321/025987.html">http://lists.horde.org/archives/dev/Week-of-Mon-20110321/025987.html</a>}
To easily debug the value of a variable in Horde PHP code, Horde::debug() can be used.  Usage:

<pre><code class="language-php">
Horde::debug(\$variable);
</code></pre>
\texttt{\$variable} is the variable you wish to debug.  The contents of this variable will be dumped into a file named \texttt{horde\_debug.txt} in your temporary directory (generally set in \texttt{horde/config/conf.php} in the \texttt{\$conf['tmpdir']} variable).  \$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():

<pre><code class="language-php">
Horde::debug(\$variable, \$filename);
</code></pre>
\texttt{\$filename} should be the full path to the filename.  If using \texttt{\$filename}, make sure the directory/file is writable by the user the PHP process runs as.

\section{IMP: IMAP/POP3 Debugging}
To enable debugging, see instructions contained in \texttt{imp/config/backends.php} (the 'debug' config parameter).

\section{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:

\begin{itemize}
\item <a href="http://xdebug.org/">Xdebug</a>: 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:
\begin{itemize}
\item Emacs extension "geben": <a href="http://code.google.com/p/geben-on-emacs/">http://code.google.com/p/geben-on-emacs/</a>


\item Firefox extension "Easy Xdebug": <a href="http://www.elime.be/easyxdebug.htm">http://www.elime.be/easyxdebug.htm</a>


\end{itemize}

\item <a href="http://www.wireshark.org/">Wireshark</a>: Especially useful for debugging HTTP-based request to and from the Horde code.


\end{itemize}
\end{document}
