A Guide to Light Table’s Watches

Brian Zindler
Oct 21, 2014 · 3 min read

What are Watches?

Watches are meant to be an improvement upon printing to the console for debugging. LT watches allow you to highlight a section of your code, and hit Alt-W to watch that section of the code. While code is being watched the last result of the code is printed next to the watched value. A watch can be removed with Alt-Shift-W. Watches are available for Clojure, Clojurescript, Javascript, and Python.

Why use Watches?

Differences. Some aspects of watches are an improvement over console printing. To print in console you need to change the text of your code, and insert a print statement. watches require no code changes. Additionally, watches are always shown right next to the value they are watching, logs are typically in another area. This is especially nice when using multiple watches. You always know where the values are coming from.

How to use Watches

https://www.youtube.com/watch?v=nOTuSkTK_PE&feature=youtu.be
https://www.youtube.com/watch?v=w0724Kokl-k

Custom Watches

Light Table allows you to customize your watches. Unfortunatley, right now they only work in Clojure, and Clojurescript. You can set up a custom Watch by going to the user keymappings. Select any key mapping you want to, and enter the type :editor.watch.custom-watch-selection as below.

Rolex

Most people will not want to create custom watches. Luckily, there is a plugin called Rolex that collects useful custom watches. Additionally Rolex provides better facilities for defining custom watches. You can get Rolex by going to the plugins menu in Light Table.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade