I have a rarely reproduced bug in ruby code. By running my test suite constantly I get it once every 10-15 minutes.
What I want to do is to have the execution recorded step by step and once it fails, go ahead and debug what happened.
I know about https://rr-project.org/ and I used it to debug such things in C++. It basically gives you a complete gdb interface into a recorded replay. Something along the same lines would be great.
There is a recording functionality:
Never really used it, but you can step back:
https://github.com/ruby/debug