Hi Aaron,

My experience with Clojure and ClojureScript typically hasn't involved the 
use of debuggers, or breakpoints, for that matter so I won't be of much 
help in that regard. Hopefully someone else can provide better info... 
Perhaps the Clojurians Slack could point out a general tutorial for Clojure 
debuggers.

>From what I have seen, debuggers are not usually called upon often (I could 
be completely wrong, just what I've seen). Instead more emphasis seems to 
be placed on using the REPL (or even print statements) to craft small and 
compose-able functions.

With Light Table, since it is written in ClojureScript and runs off of 
Electron, you can access various web development tools via View -> 
Developer Tools. I believe there is currently a bug where you cannot really 
inspect the compiled JavaScript source without the application breaking. 
Unfortunately, this is where you would be able to insert breakpoints. A 
latter version of ClojureScript allows source maps, which would mean that 
you can see ClojureScript rather than the resulting JavaScript, but Light 
Table is using an older version... We are in the process of updating our 
internal ClojureScript version and then our Electron version, so it is 
possible we will have functioning breakpoints at some point.

This leaves logging statements as the primary source of debugging for Light 
Table, which can be inserted like `(.log js/console (str "I am a" " 
string"))`

If you were simply looking for more information on how to develop Light 
Table specifically, there are handful of useful docs located here 
https://github.com/LightTable/LightTable/tree/master/doc that might be 
useful. There is also a Light Table Developer's Guide under development 
located at: 
https://www.gitbook.com/book/lighttable/light-table-developers-guide/details

Hope that helps, I'm happy to provide more information!

Scott



On Monday, February 20, 2017 at 10:15:51 PM UTC-5, Aaron Hoffer wrote:
>
> I want to do a little development on LightTable itself, but I'm new to 
> Clojure. I don't know how the whole tool chain fits together.  But my day 
> job is developing in Java. When I want to tinker with an application in 
> Java, I use IntelliJ to connect a debugger. Then I put some breakpoints in 
> the IDE, wait until a breakpoint is hit, then step through the code.
>
> Is there something analogous in Clojure? LightTable? How do I attach a 
> debugger to LightTable, set some breakpoints in the source code, and step 
> through the code when the breakpoints are hit?
>
> Can you point me to a good tutorial?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to