mirror of
https://github.com/janet-lang/janet
synced 2025-10-23 03:37:40 +00:00
Add debug/step to single step a fiber.
Very useful for implementing debuggers.
This commit is contained in:
@@ -69,7 +69,8 @@
|
||||
(def sourcemap (dasm 'sourcemap))
|
||||
(var last-loc [-2 -2])
|
||||
(print "\n function: " (dasm 'name) " [" (in dasm 'source "") "]")
|
||||
(printf " constants: %.4Q\n" (dasm 'constants))
|
||||
(when-let [constants (dasm 'constants)]
|
||||
(printf " constants: %.4Q\n" constants))
|
||||
(printf " slots: %.4Q\n\n" (frame :slots))
|
||||
(def padding (string/repeat " " 20))
|
||||
(loop [i :range [0 (length bytecode)]
|
||||
|
||||
Reference in New Issue
Block a user