It’s interesting that this turned into a “debugger vs unit tests” debate. I never thought of those as competing methodologies before, but now that I think about it, I rarely use a debugger on projects where I have unit tests.
If somebody wants to unite those two worlds, I would be really happy to have a debugger that can output unit tests. Basically, I’d like to be able to “capture” the function call that I’m in, including all of the arguments that were passed to the function (I don’t care about global state) and save all that to a text file as a @test
. (Bonus points if it can also read my mind and fill in the expected return value, but otherwise I’ll do that myself.)