Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a minimal debugger for .tcl integration test suite. (valkey…
…-io#683) Introduce a break-point function called `bp`, based on the tcl wiki's minimal debugger. ```tcl proc bp {{s {}}} { if ![info exists ::bp_skip] { set ::bp_skip [list] } elseif {[lsearch -exact $::bp_skip $s]>=0} return if [catch {info level -1} who] {set who ::} while 1 { puts -nonewline "$who/$s> "; flush stdout gets stdin line if {$line=="c"} {puts "continuing.."; break} if {$line=="i"} {set line "info locals"} catch {uplevel 1 $line} res puts $res } } ``` ``` ... your test code before break-point bp 1 ... your test code after break-point ``` The `bp 1` will give back the tcl interpreter to the developer, and allow you to interactively print local variables (through `puts`), run functions and so forth. Source: https://wiki.tcl-lang.org/page/A+minimal+debugger --------- Signed-off-by: Kyle Kim <[email protected]> Signed-off-by: Madelyn Olson <[email protected]> Co-authored-by: Madelyn Olson <[email protected]>
- Loading branch information