Updated 2016-07-25 15:29:37 by dkf

tcl_traceExec, a built-in Tcl variable, controls how much tracing information is displayed during bytecode execution.

See Also  edit

bytecode

Description  edit

By default, the value of $tcl_traceExec is 0, and no information is displayed. Setting $tcl_traceExec to 1 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 is 2 or 3, commands such as set and incr 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 to configure during the build of Tcl.