TraceOff is an option for Trace and related functions which specifies forms inside which tracing should be switched off.
The setting for TraceOff gives a pattern which is compared with expressions to be evaluated. If the pattern matches the expression, then tracing will be switched off while that expression is being evaluated. The pattern is also tested against tags associated with the evaluation.
You can use TraceOff to avoid tracing inner parts of a computation.
The default setting TraceOff
None never switches off tracing.
TraceOn will not work inside TraceOff.
During the execution of Trace, the settings for TraceOn and TraceOff can be modified by resetting the values of the global variables $TraceOn and $TraceOff.
See the Mathematica book: Section 2.5.10.
See also: TraceDepth, TraceOn.
Here is a recursive definition of a factorial function.
Here is a rule for a log function.
This shows all steps in the evaluation.
This shows only those steps that occur during the evaluation of fac.
This shows only those steps that do not occur during the evaluation of fac.