JanetDocsPlaygroundI'm feeling luckyGitHub sign in

*debug*



    keyword
    boot.janet on line 1202, column 1

    Enables a built in debugger on errors and other useful features for 
    debugging in a repl.


1 exampleSign in to add an example
Loading...
#1) start janet normally, work in the repl, encounter something to debug:

(debug)
# debug: 
#   in thunk [repl] (tail call) on line 4, column 1
# nil
# repl:5:> 

#2) because the -d flag was missing on start, debug is skipping back out into the repl. now i really DO want to debug here and now, without restarting the vm:

(dyn *debug*)
# => nil

#3) we can just set the flag ourself and thus activate the debugger:
(setdyn *debug* :anything_truthy)


(debug)

# debug: 
#   in thunk [repl] (tail call) on line 2, column 1
# entering debug[1] - (quit) to exit
# debug[1]:1:>
kamisoriPlayground