Clairvoyant is really great Joel!
I'd like to use the trace-forms inside my project. 

My thought is to have a macro named: dbgfn that will replace defn in the places 
where I need to investigate my function calls.

Like this:

(defmacro dbgfn[& args]
  `(trace-forms {:tracer clairvoyant.core/default-tracer}
    (defn ~@args)))


and then:
(dbgfn foo [a b] 
    (+ a b))


But I am not able to write correctly my dbgfn macro.
At run-time, I get the following error:
ReferenceError: clairvoyant is not defined 

I found a workaround by adding to to each namespace that uses dbgfn the 
following:
(:require  [clairvoyant.core :as trace :include-macros true])
But it is not convenient.
 

Could you help, please?

On Thursday, 23 October 2014 18:37:27 UTC+3, Joel Holdbrooks  wrote:
> On Wednesday, October 22, 2014 10:15:13 PM UTC-7, Joel Holdbrooks wrote:
> > Clairvoyant, a flexible tracing library for ClojureScript is now version 
> > 0.0-43-ga703f4e. Included in this release:
> > 
> > * Fixed bug which caused anonymous functions to thrown an exception
> > * Fixed bug with IPrintWithWriter protocol causing maximum call stack 
> > exceeded exceptions
> > * Improved display of exit values and function values (you only see the 
> > "noise" when you want to)
> > * Basic tracing for deftype and defrecord
> > * trace-forms can be called without the options map
> > 
> > I hope these features improve your debugging experience.
> > 
> > Leiningen dependency: [spellhouse/clairvoyant "0.0-43-ga703f4e"]
> > 
> > Project homepage: https://github.com/spellhouse/clairvoyant
> 
> Just noticed there were a few problems with the last release. Please use: 
> [spellhouse/clairvoyant "0.0-46-g876ac46"] instead. Sorry!

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to