BUILT-IN WOLFRAM LANGUAGE SYMBOL

TraceOn

TraceOn
is an option for Trace and related functions which specifies when tracing should be switched on.

DetailsDetails

  • With the setting TraceOn->patt, Trace and related functions do not start tracing until they encounter expressions to evaluate which match the pattern patt. This pattern is also tested against tags associated with the evaluation.
  • TraceOff can be used within tracing switched on by TraceOn.
  • Once tracing has been switched off by TraceOff, however, TraceOn will not switch it on again.
  • During the execution of Trace, the settings for TraceOn and TraceOff can be modified by resetting the values of the global variables and .

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Trace evaluation of an expression that evaluates a function g:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Trace only evaluation inside of g:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 1991
(2.0)