Follow instructions on the Clojars page
On fn
or defn
append -input
, -output
, -io
, -group
or -group-io
to wrap function to log stuff in the console
-(ns hello)
+(ns hello
+ (:use [debug.macro]))
-(defn my-function
+(defn-group-io my-function
[arg]
(do-stuff arg))
Check more on the documentation
Just use :use
, it will import everything in the scope
It's "dirty" but short and simple : perfect while debugging
-(ns hello)
+(ns hello
+ (:use [debug.print])
+ (:use [debug.macro]))
In CLJS, it seems that we have to explicit refer to everything that we want to use
Looking for a shorter way contributions are welcome
-(ns hello)
+(ns hello
+ (:require
+ [debug.print :refer [pretty-print
+ spy
+ group-begin group-begin-collapsed group-end
+ print-group]]
+ [debug.macro :refer-macros [fn-input fn-output
+ fn-io fn-group fn-group-io
+ defn-io defn-group defn-group-io]]))
Meld both CLJ and CLJS
Looking for a shorter way contributions are welcome
-(ns hello)
+(ns hello
+ (:require
+ [debug.print :refer [pretty-print
+ spy
+ group-begin group-begin-collapsed group-end
+ print-group]]
+ [debug.macro
+ :refer [fn-input fn-output
+ fn-io fn-group fn-group-io
+ defn-io defn-group defn-group-io]
+ :refer-macros [fn-input fn-output
+ fn-io fn-group fn-group-io
+ defn-io defn-group defn-group-io]]))
Maybe it works, maybe it doesn't
I haven't tested it, i don't know how to test it
Check the demo folder
Any contributions (feedback, bug report, merge request ...) are welcome
clj -A:test
rm --force pom.xml
export CLOJARS_USERNAME=username
export CLOJARS_PASSWORD=password
clj -M:release
Can you improve this documentation?Edit on GitLab
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close