Sorry for the delayed reply.
Is there interest in addition of a new "yield" command (or some such),
designed to automate stepping into the yielded block?
I understand there may be issues around yield in ruby-debug, but I am not exactly certain what situation you encounter and specifically what you are asking for.
Perhaps giving a the smallest program that can demonstrates the problem, and a session which show what you tried and what you got will clarify. And it can serve as a basis for which to consider and judge existing alternatives.
This would be
equivalent to (and the trivial implementation is basically the same
as):
break __LINE__ + 1
next+
delete (last breakpoint)
continue __LINE__ + 1
is the same as "break __LINE__ + 1"; "delete" (last breakpoint)
I have that implemented for myself and I find it to save a ton of
time, since it's such a common operation. My all-ruby implementation
can't handle one-liners, nor can it detect if the next line isn't
actually inside a block (in which case it'll be equivalent to running
next+). Assuming that people like the idea of the command, and are
willing to accept the limitations of the current command, I can submit
patches soon (docs are TBD). If the idea is good, but the limitations
are unacceptable, I can look into a more complex implementation.
Otherwise I'll just put my patch set up somewhere for other people to
use as they wish.
Thanks
Dave
As I said above, I realize there are issues regarding "yield" in ruby-debug. Perhaps what you are asking for is addressed by the newer debuggers.
In the debugger-enhanced patches for YARV 1.9.2 used by rb-trepanning, a "yield" event was added.
For rubinius, rbx-trepanning understands when a block is about to be yielded and considers this in stepping.
Ruby-core developers have said there will be no more feature enhancements to MRI 1.8, and I am generally not interested in more kludgy workarounds to ruby-debug.
That said, it is fairly straight-forward how to add new debugger commands in ruby-debug. In the trepanning debuggers though it is even easier as there is a user directory where you can create for your own debugger commands. In ruby-debug there is only one command directory.