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

TracePrint

TracePrint[expr]
prints all expressions used in the evaluation of expr.
TracePrint[expr, form]
includes only those expressions which match form.
TracePrint[expr, s]
includes all evaluations which use transformation rules associated with the symbol s.
  • TracePrint indents its output in correspondence with the nesting levels for lists generated by Trace.
  • The indentation is done using the print form defined for the object Indent[d].
  • TracePrint prints the forms of expressions before any of their elements are evaluated.
  • TracePrint[expr] returns the result of evaluating expr.
Print all expressions used in evaluation of an expression:
 
A recursive definition for finding Fibonacci numbers:
In[1]:=
Click for copyable input
Show all additions of positive integers:
New in 2