Assuming `rev?` is not an atom, then you could probably do:

  
(.log js/console rev?)

in order to check the value.

If it was an atom then you should give (.log js/console @rev?)  a try.

I assume the command `:find-show` is from find.cljs, which is not a plugin... 
thus it won't automatically compile and reload. This would mean that it is 
probably necessary to confirm that you rebuilt Light Table. 
https://github.com/LightTable/LightTable/blob/master/doc/developer-install.md 
should give some instructions on how to do so. Alternatively, you could try 
eval-ing the file (via Ctrl-Shift-Enter) but this does not always work out as 
expected when eval-ing the core of Light Table.




On Thursday, February 23, 2017 at 11:13:58 PM UTC-5, Aaron Hoffer wrote:
>
> That was a great help Scott. I got something to print out in the Console 
> in the browser's console. Then I got stuck again. I wanted to find out 
> something about the parameter "rev?" in the function below. How? I'd like 
> to know its value. I can't figure out how to get the value much less trace 
> the flow of execution. Any more advice?
>
> (cmd/command {:command :find.show
>               :desc "Find: In current editor"
>               :exec (fn [rev?]
>                       (.log js/console "Hello World")
>                       (object/merge! bar {:reverse? rev?})
>                       (object/raise bar :show!)
>                       (object/raise bar :focus!))})
>
>
>
>
> On Monday, February 20, 2017 at 8:37:48 PM UTC-7, Scott Bauer wrote:
>>
>> 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 light-table-discussion+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to