Created
August 10, 2009 21:08
-
-
Save dscho/165418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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