, a built-in Tcl
variable, controls how much tracing information is displayed during bytecode execution.
See Also edit
By default, the value of $tcl_traceExec
, and no information is displayed. Setting $tcl_traceExec
generates a one-line trace in stdout on each call to a Tcl procedure. Setting it to 2
generates a line of output whenever any Tcl command is invoked that contains the name of the command and its arguments. Setting it to 3 produces a detailed trace showing the result of executing each bytecode instruction. Note that when $tcl_traceExec
, commands such as set
that have been entirely replaced by a sequence of bytecode instructions are not shown. Setting this variable is useful in tracking down suspected problems with the bytecode compiler and interpreter.$tcl_traceExec
and its functionality only exist if TCL_COMPILE_DEBUG
was defined when Tcl was compiled. This is usually done by passing --enable-symbols=compile
during the build of Tcl.