\documentclass{article}
\usepackage{ulem}
\pagestyle{headings}
\begin{document}
\part{ Debugging Tools For Horde 4 or later}
\section{ Horde::debug() 1\footnote{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:

\begin{verbatim}

Horde::debug($variable);
\end{verbatim}

\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).  Colortext: NI\$variable MUST NOT be debug\_backtrace().Colortext: NI

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

\begin{verbatim}

Horde::debug($variable, $filename);
\end{verbatim}

\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{Xdebug\footnote{http://xdebug.org/}: 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": http://code.google.com/p/geben-on-emacs/\footnote{http://code.google.com/p/geben-on-emacs/}}
\item{Firefox extension "Easy Xdebug": http://www.elime.be/easyxdebug.htm\footnote{http://www.elime.be/easyxdebug.htm}}
\end{itemize}
\item{Wireshark\footnote{http://www.wireshark.org/}: Especially useful for debugging HTTP-based request to and from the Horde code.}
\end{itemize}
\end{document}
