Fork me on GitHub
#unrepl
<
2017-07-04
>
cgrand13:07:31

Does anybody use a JVM debugger with Clojure!?

richiardiandrea13:07:44

@cgrand occasionally, very occasionally I use cider, but not an actual JVM debugger

cgrand13:07:43

I wasted time during lunch figuring out why argnames wheren’t always available...

cgrand13:07:21

the answer: the stubs invoke which delegate to invokeStatic don’t have this information...

cgrand13:07:18

which leads me to think that almost nobody use debuggers

pesterhazy13:07:32

I've tried visualvm in the past for profiling, but couldn't ever get it to work properly (with boot)

richiardiandrea13:07:40

well I don't really know what cider does there but I really rarely use debuggers

cgrand14:07:39

@richiardiandrea I think that cider don’t use a “true” (jvm) debugger. Can you step in java code? (eg in Clojure hash maps)

cgrand14:07:27

@pesterhazy visualvm works but most defaults are off (haven’t tried with boot though)

richiardiandrea14:07:58

Yeah you might be right, I actually never debugged java code with cider

cgrand15:07:54

Not an unrepl yet (but it’s a standard “sub” repl, so upgradable):

Clojure 1.8.0
user=> (require '[net.cgrand.poucet :refer [trace break]])nil
user=> (defn fact ([n] (fact n 1)) ([n p] (if (pos? n) (fact (dec n) (* n p)) p)))
#'user/fact
user=> (break fact)
#object[com.sun.tools.jdi.EventRequestManagerImpl$MethodEntryRequestImpl 0x6edc4161 "method entry request  (enabled)"]
user=> (fact 4)
arguments n: 4
"user$fact" "invoke" "<no source>" => :cont
arguments n: 4, p: 1
"user$fact" "invoke" "<no source>" => :cont
arguments n: 3, p: 4
"user$fact" "invoke" "<no source>" => :cont
arguments n: 2, p: 12
"user$fact" "invoke" "<no source>" => :cont
arguments n: 1, p: 24
"user$fact" "invoke" "<no source>" => :cont
arguments n: 0, p: 24
"user$fact" "invoke" "<no source>" => :cont
24
user=>

cgrand19:07:17

I thought we were aiming at