This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

TraceDepth

TraceDepth
is an option for Trace and related functions which specifies the maximum nesting of evaluation chains that are to be included.
  • Setting TraceDepth->n keeps only parts down to level n in nested lists generated by Trace.
  • By setting TraceDepth, you can make Trace and related functions skip over "inner" parts of a computation, making their operation more efficient.
A recursive definition for finding Fibonacci numbers:
Trace only evaluations through depth 3:
Trace all evaluations:
A recursive definition for finding Fibonacci numbers:
In[1]:=
Click for copyable input
Trace only evaluations through depth 3:
In[2]:=
Click for copyable input
Out[2]=
Trace all evaluations:
In[3]:=
Click for copyable input
Out[3]=
New in 2