1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-24 23:40:27 +00:00
janet/examples/debug.janet
Calvin Rose 7df0ec6aed Fix up debug/step and janet_step.
Also allow debugging on all signals, including errors.
This is gated behind (setdyn :debug true) in the repl.
2019-11-25 20:00:13 -06:00

12 lines
184 B
Plaintext

# Load this file and run (myfn) to see the debugger
(defn myfn
[]
(debug)
(for i 0 10 (print i)))
(debug/fbreak myfn 3)
# Enable debugging in repl with
# (setdyn :debug true)