({{, (RefLink[StackComplete, paclet:ref/StackComplete])[expr]
evaluates expr with intermediate expressions in evaluation chains included on the stack. }})

OpenersNotesSection(Spacer1)Details

The Wolfram System normally includes only the latest expression on each evaluation chain involved in the evaluation of a particular expression. Inside (RefLink[StackComplete, paclet:ref/StackComplete]), however, all preceding expressions on the evaluation chains are included.

(RefLink[StackComplete, paclet:ref/StackComplete]) typically increases significantly the number of expressions kept on the evaluation stack.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Include intermediate expressions in the evaluation stack:

f[x_] := g[x^2];
g[x_] := (Print[Stack[_]];x+1);

StackComplete[1 + f[2]]

Without (RefLink[StackComplete, paclet:ref/StackComplete]), you do not see how f and g are used:

1+f[2]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Stack, paclet:ref/Stack])  ▪  (RefLink[TraceBackward, paclet:ref/TraceBackward])  ▪  (RefLink[TraceAbove, paclet:ref/TraceAbove])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[The Evaluation Stack, paclet:tutorial/TheEvaluationStack])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Symbolic Execution History, paclet:guide/SymbolicExecutionHistory])}})}})