\HeaderA{traceMethods}{A function to turn on tracing for all methods of a S4 generic
function.}{traceMethods}
\aliasA{untraceMethods}{traceMethods}{untraceMethods}
\begin{Description}\relax
This function can turn on tracing for all methods (or a subset of
the methods) of a generic function.  It is useful when debugging,
as it can help see how the methods are being traversed.
\end{Description}
\begin{Usage}
\begin{verbatim}
traceMethods(generic, traceStrings, tracer)
untraceMethods(generic, methodSigs)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{generic}] The name of the generic function, quoted or not. 
\item[\code{traceStrings}] A string to print when each method is entered. 
\item[\code{tracer}] A function to insert as the tracer, if missing a function
that prints the methods signature is used.
\item[\code{methodSigs}] A set of method signatures, as a character vector, 
that tracing will be turned off for.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{traceMethods} uses \code{showMethods} to figure out what methods 
exist, and what the signatures are. It then uses \code{trace} to set a trace on
all methods.

\code{untraceMethods} uses the returned value of \code{traceMethods},
or any other similar construct to untrace methods for a generic.
\end{Details}
\begin{Value}
A vector of method signatures is returned.  This could be then 
used to untrace the methods (something else to automate).
\end{Value}
\begin{Author}\relax
R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{showMethods}{showMethods}}, \code{\LinkA{trace}{trace}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Not run: 
   traceMethods{slice}
   untraceMethods{slice}
## End(Not run)
\end{ExampleCode}
\end{Examples}

