That works well for ruby and javascript and probably lots of others.
e.g. something like the equivalent of
def foo
bar.map do |b|
b.do_something!
debugger if b.state == :something_youre_interested_in
end
rescue => e
debugger
end
I'm really excited by Replay. I think it will be invaluable.> Making watch logic for that sometimes is too complicated or changes the outcome (race conditions especially).
Obviously you remove that debug statement from your code after you're finished debugging.
roc (the original author of rr) founded a company to build an even more compelling product on top of rr called Pernosco. They have some mind-blowing demos I'd recommend you check out: https://pernos.co/ .
Being able to easily answer questions like "where did the value in this variable come from, and when did it get set?" makes debugging a wildly different experience.
Also the GP claims "nobody" uses breakpoints? Everyone in my team uses them all the time.
Suppose it all depends on your language/tool chain, in my experience breakpoints are very commonly used by developers in visual studio.
So much so that I prefer to put the condition in my local build as source code then put a normal breakpoint on that after it has rebuilt (a few millseconds with a good watcher)
I love the idea of reply, but is it targeting the wrong people to get the post leverage out of it? Print statements generally don't need to be used for debugging if you know how to use a debugger. Which really isn't difficult if you spend maybe half an hour learning it's features.
It's really a poor man's replay, though. That tool looks really slick, I'll definitely give the Python version a go if/when it comes!
Also, "nobody" uses breakpoints? Everyone in my team uses them all the time.