dp_traceProc procedure commandSets up a procedure trace on procedure and returns a trace id to identify the new procedure trace. Procedure may be an abbrevation. In any furthur evaluation of Tcl code, right before any procedure whose name starts with the string procedure is evaluated, command is evaluated with the arguments of the trace id, the level of nesting, and the command line that was to be evaluated before the procedure trace interrupted.
Example usage:
proc PrintTrace {traceId level args} { set fmtstr "%[set level]s" puts stdout "[format $fmtstr ""] $args" } dp_traceProc e PrintTrace;From now on, all commands starting with the character "e" will be traced.
dp_untraceProc traceIdRemoves the procedure trace defined by traceId.