I found a link to REPL Debugging: No Stacktrace Required in a workflow thread here that gave this tip, obvious in retrospect but it never crossed my mind:
To blindly subdivide the problem, start with the your problem case and explicitly eval all the subpieces. This will often identify which subpiece is the problem, and you can work your way down until you have a problem that you can understand at a glance. Since
foo
uses only one name,n
, I will temporarily def that name at the top level:(def n 24)
Now I can evaluate every subform in foo, just by putting my cursor at the end of each form and sending that form to my REPL
This seems like a nice generic and quick version of CIDER’s debugger.
I recommend that blog post btw, I thought it was really well written.