mirror of
https://github.com/janet-lang/janet
synced 2024-11-29 03:19:54 +00:00
Expose debugger-env
This makes it easier/possible to use the debugging functionality in a more flexible way.
This commit is contained in:
parent
8bbb7907d6
commit
67f1872f4a
@ -2483,8 +2483,11 @@
|
||||
(set res (debug/step (.fiber))))
|
||||
res)
|
||||
|
||||
(def debugger-env
|
||||
"An environment that contains dot prefixed functions for debugging."
|
||||
@{})
|
||||
|
||||
(def- debugger-keys (filter (partial string/has-prefix? ".") (keys _env)))
|
||||
(def- debugger-env @{})
|
||||
(each k debugger-keys (put debugger-env k (_env k)) (put _env k nil))
|
||||
(put _env 'debugger-keys nil)
|
||||
|
||||
@ -2548,8 +2551,6 @@
|
||||
:on-status (or onsignal (make-onsignal env 1))
|
||||
:source "repl"}))
|
||||
|
||||
(put _env 'debugger-env nil)
|
||||
|
||||
###
|
||||
###
|
||||
### CLI Tool Main
|
||||
|
Loading…
Reference in New Issue
Block a user