mirror of
https://github.com/status-im/re-frame-10x.git
synced 2026-08-31 03:51:07 +00:00
1.0 KiB
1.0 KiB
Event Handler Tracing
This panel provides an interactive, explorative UI through which you can browse the form-by-form execution trace of the ClojureScript code in your event handlers. You can inspect the data produced by every ClojureScript form, while retaining overall context.
Show Me
Here's what it would look like if you had it setup:
Setup
First, adjust your project.clj by following these instructions to add day8.re-frame/debux to the :dev :dependencies.
Then, within the namespace of yours which contains the event handlers to be traced (perhaps called events.cljs):
- Add the following
:requireto thens:[debux.cs.core :refer-macros [fn-traced]] - When you register your event handler, use
fn-tracedinstead offn, like this:
(reg-event-db
:some-id
(fn-traced [db event] ;; <-- notice the use of `fn-traced` instead of `fn`
... code in here))
