ko1 note: This article is written by Claude code.
ko1 note: lumitrace itself is written by Codex.
Time to ditch puts debugging.
We've all been there. "What's in this variable again?" So you sprin...
ko1 note: This article is written by Claude code.
ko1 note: lumitrace itself is written by Codex.
Time to ditch puts debugging.
We've all been there. "What's in this variable again?" So you sprinkle p value everywhere, run the script, delete the prints, add more somewhere else...
With Lumitrace, you can record the value of every expression without touching your code at all.
Install
gem install lumitrace
One Command Is All You Need
lumitrace your_script.rb
That's it. Every line's result shows up inline:
5| base = n + 1 #=> 3 (3rd run)
6| scaled = Sample2.scale(base) #=> 6 (3rd run)
7| squares = Sample3.series(n) #=> [1, 4] (3rd run)
You can see how many times each line ran. No more lining up five puts statements to track a loop.
Beautiful HTML Reports
lumitrace -h your_script.rb
This generates an HTML report you can open in your browser. It comes with a file tree, line coverage, and clear markers: 🔎 for executed expressions, ∅ for unexecuted ones. Spotting dead code takes a glance.
ko1 note: generated sample HTML
Share the URL with a teammate and they'll land on the exact same file and line.
The Ultimate Debugging Flow for Failing Tests
A test just failed. The logs aren't helping. Here's what you do:
lumitrace -t exec rake test
Run your entire test suite through Lumitrace and see the actual values around the failure.
"Expected 5 but got 3. Why?" -- every intermediate computation is recorded, so the answer is right there.
Amazing with AI
This is where Lumitrace really shines.
lumitrace --collect-mode last -j exec rake test
Dump runtime values as JSON and hand them straight to an AI. Instead of guessing from source code alone, the AI can see what actually happened -- and its accuracy goes through the roof.
Drop this snippet into your project's CLAUDE.md or AGENTS.md and AI agents will pick it up on their own:
## Debugging (Lumitrace)
lumitrace is a tool that records runtime values of each Ruby expression.
When a test fails, read `lumitrace help` first, then use it.
Basic: `lumitrace -t exec rake test`
ko1 note: I haven't actually tried this myself yet... If anyone gives it a shot and it works, please let me know!
Trace Only What You Changed with git diff
lumitrace -g your_script.rb
The -g flag traces only lines touched by git diff. Even on large projects the output stays compact. Perfect for a quick sanity check before opening a PR.
Works in CI Too
Enable Lumitrace in GitHub Actions, upload the HTML report to Pages, and your whole team can browse the runtime values of a failing test right from the browser.
Cheat Sheet
Goal
Command
Quick look
lumitrace your_script.rb
HTML report
lumitrace -h your_script.rb
Trace tests
lumitrace -t exec rake test
Feed to AI
lumitrace --collect-mode last -j exec rake test
Changed lines only
lumitrace -g your_script.rb
Reclaim the time you've been spending on puts debugging.
Check out the tutorial for the full guide.
ko1 note: There is a Ruby playground powered by Lumitrace: https://ko1.github.io/lumitrace/runv/
Topics:
lumitrace
debugging
code analysis
html reports
Originally appeared on Short Ruby Newsletter.The one where we get Hotwire Skills from Hotwire Club, Peter Cooper launches Planet Ruby, Evil Martians launches Tutorialkit.rb, Yuri Sidorov launched R...
Originally appeared on Short Ruby Newsletter.The one where we get Hotwire Skills from Hotwire Club, Peter Cooper launches Planet Ruby, Evil Martians launches Tutorialkit.rb, Yuri Sidorov launched Ruby Community and new features approved to be implemented in Ruby
Originally appeared on Short Ruby Newsletter.The one where Ruby 4.0.1 is released, TruffleRuby 33 is released, Programming Ruby 4 enters beta, Google Summer of Code invites for Ruby projecs and whe...
Originally appeared on Short Ruby Newsletter.The one where Ruby 4.0.1 is released, TruffleRuby 33 is released, Programming Ruby 4 enters beta, Google Summer of Code invites for Ruby projecs and where we found Ruby is token efficient
Originally appeared on Short Ruby Newsletter.The one with Rails 8.1.1 release, where Jean Boussier does a deep dive into frozen string literals, where San Francisco Ruby is two weeks away, and Trop...
Originally appeared on Short Ruby Newsletter.The one with Rails 8.1.1 release, where Jean Boussier does a deep dive into frozen string literals, where San Francisco Ruby is two weeks away, and Tropical On Rails launched the tickets.
Topics:
ruby newsletter
frozen string literals
san francisco ruby
tropical on rails
Originally appeared on Short Ruby Newsletter.The one where the date was announced for Rails World 2026, where Aaron Patterson showcased the performance of object allocation in Rails 4.0, where Cook...
Originally appeared on Short Ruby Newsletter.The one where the date was announced for Rails World 2026, where Aaron Patterson showcased the performance of object allocation in Rails 4.0, where Cookpad share how Rails help them scale, and Fizzy got API support
Originally appeared on Short Ruby Newsletter.The one where Ruby gets a new homepage, Ruby 4.0.preview3 and Ruby 3.4.8 are released, Ryan Davis announced Minitest 6.0 and where Marco Roth gets the R...
Originally appeared on Short Ruby Newsletter.The one where Ruby gets a new homepage, Ruby 4.0.preview3 and Ruby 3.4.8 are released, Ryan Davis announced Minitest 6.0 and where Marco Roth gets the Rails Luminary award
Originally appeared on Short Ruby Newsletter.The one where Roadmap launched a Roadmap for learning Ruby, where Rails 8.1.2 is officially released, Devise reaches the 5.0 mark and where Intercom sha...
Originally appeared on Short Ruby Newsletter.The one where Roadmap launched a Roadmap for learning Ruby, where Rails 8.1.2 is officially released, Devise reaches the 5.0 mark and where Intercom shares data about how they ship to production.
Originally appeared on Short Ruby Newsletter.The one where Rails 8.1.0 is released, where Ruby 3.3.10 is patched, where Scott Harvey launched Rails Pulse project and Brad Gessler launches Phlex on ...
Originally appeared on Short Ruby Newsletter.The one where Rails 8.1.0 is released, where Ruby 3.3.10 is patched, where Scott Harvey launched Rails Pulse project and Brad Gessler launches Phlex on Rails course
Originally appeared on Short Ruby Newsletter.37 Signals launches Fizzy, Bridgetown announces 2.1 beta 1, Bundle 4.0 is released, Wired wrote a strange article about Ruby, and Errol Schmidt publishe...
Originally appeared on Short Ruby Newsletter.37 Signals launches Fizzy, Bridgetown announces 2.1 beta 1, Bundle 4.0 is released, Wired wrote a strange article about Ruby, and Errol Schmidt published their Survey Results with Ruby/Rails leaders.
Originally appeared on Short Ruby Newsletter.The one where 37 Signals launches Upright open source monitoring tool, Rubocop gets an experimental MCP server, Rails Designer shows us how to use Stimu...
Originally appeared on Short Ruby Newsletter.The one where 37 Signals launches Upright open source monitoring tool, Rubocop gets an experimental MCP server, Rails Designer shows us how to use Stimulus to record videos in Rails and RSpec launches v.4.0.0.beta1