TL;DR this macro is a pain in the proverbial arse:
(defmacro dbg
"Useful debugging macro that prints the source and value of x,
as well as package name and line number. Returns x."
[x]
(let [ns (str cljs.analyzer/*cljs-ns*)]
`(let [x# ~x]
(println (str "dbg "
~ns ":"
~(:line (meta &form))
": "
~(pr-str x)
": "
(pr-str x#)))
x#)))
TL;DR this macro is a pain in the proverbial arse: