Instrument user code to "light up" when it runs. The instrumented code will report the value of local variables and report its return value. Implemented as an extension of the debugger.
Instrument user code to "light up" when it runs. The instrumented code will report the value of local variables and report its return value. Implemented as an extension of the debugger.
(eval-with-enlighten form)Like eval, but also enlighten code.
Called once per top-level form. Binds d/*top-level-form-meta* to the form's
own metadata so each overlay is placed by that form's line/column rather than
by the start of the whole evaluation - which matters when one evaluation spans
several top-level forms (e.g. evaluating a region).
Like `eval`, but also enlighten code. Called once per top-level form. Binds `d/*top-level-form-meta*` to the form's own metadata so each overlay is placed by that form's line/column rather than by the start of the whole evaluation - which matters when one evaluation spans several top-level forms (e.g. evaluating a region).
(light-form form {:keys [coor] :as extras} original-form)Return the result of form, and maybe enlighten it.
Return the result of form, and maybe enlighten it.
(send-if-local sym extras locals)If locals contains sym, send its value over the debug channel.
The value is added to extras under :debug-value, and extras is
sent over the debug channel with the :enlighten status.
If locals contains sym, send its value over the debug channel. The value is added to `extras` under :debug-value, and `extras` is sent over the debug channel with the :enlighten status.
(wrap-function-form [head & args :as form] {:keys [coor]})Wrap a form representing a function/macro/special-form call. Return an equivalent form, instrumented to work with enlighten.
fn*/def/loop* get special handling (they can run several times in a
single evaluation, so the client must clean up overlays from previous runs).
Every other sub-form simply reports its own value, so the whole computation
lights up - not just the definition's return value.
Wrap a form representing a function/macro/special-form call. Return an equivalent form, instrumented to work with enlighten. `fn*`/`def`/`loop*` get special handling (they can run several times in a single evaluation, so the client must clean up overlays from previous runs). Every other sub-form simply reports its own value, so the whole computation lights up - not just the definition's return value.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |