Skip to content

Instantly share code, notes, and snippets.

@dscho dscho/gist:165418
Created Aug 10, 2009

Embed
What would you like to do?
set debugfd [open "debug.txt" w]
rename proc _proc
_proc proc {name arglist body} {
uplevel 1 [list _proc $name $arglist $body]
uplevel 1 [list trace add execution $name enterstep [list ::proc_start $name]]
}
_proc proc_start {name command op} {
global debugfd
puts $debugfd "$name >> $command"
}
rename set _set
proc set {var args} {
global debugfd
puts $debugfd [list set $var $args]
uplevel _set $var $args
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.