if 0 {[Richard Suchenwirth] 2005-07-13 - Here's a simple sketch how you can get the "dynamic call graph" (which shows which procedure actually called which other in a program run): } rename proc _proc _proc proc {name argl body} { _proc $name $argl callgraph'report\n$body } _proc callgraph'report {} { if [catch {info level -2} res] {set res ""} set ::callgraph([lindex $res 0],[lindex [info level -1] 0]) "" } #--- Testing proc a {} {b; c } proc b args {d; e} proc c {} {b; d} proc d {} {} proc e {} {} a parray callgraph if 0 {which returns (the values are always "", a key a,b expresses that a called b): callgraph(,a) = callgraph(,parray) = callgraph(a,b) = callgraph(a,c) = callgraph(b,d) = callgraph(b,e) = callgraph(c,b) = callgraph(c,d) = ---- [Category Debugging] | [Arts and crafts of Tcl-Tk programming] }