LightTable / Javascript

Javascript language plugin for Light Table
MIT License
56 stars 79 forks source link

Feature request: debug for loops, command: watch all. #19

Open falafflepotatoe opened 8 years ago

falafflepotatoe commented 8 years ago

I feel you should be able to watch variables inside for loops with lighttables watch, I could not.

Maybe see comealive.io for an example.

I also think a 'watch all' cmd is lacking.

kenny-evitt commented 8 years ago

Alive is certainly pretty cool – thanks for the link!

But without some of the UI features that Alive includes – like the slider for changing the current loop index variable value – it's not clear how this would work in LT. If you watch a variable inside a loop, you'd just see the final value of the variable. I guess we could stack all of the values for each iteration or, to be even cooler, stack any variables inside the loop being watched together (e.g. in a visual box) for each iteration.

Why not take a stab at this yourself? Myself, or the other core team members, or even some other contributors, will be happy to help answer any questions you might have.

falafflepotatoe commented 8 years ago

@kenny-evitt

I thought about that, while developing it my plan was to just display [val1, val2, val3] or { 0: val1, 1: val2, 2: val3 } where the key is the iteration. At least until we implemented the slider.

Thought about trying it myself but not a cljs guy. I'm hestitant to get addicted to hacking the light table src and then spend the next year writing IDEs.