Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Roger Pack
RE: Adding "yield" command [ reply ]  
2011-07-06 14:57
I know there's a new google group, might be useful there...
http://groups.google.com/group/ruby-debugger

By: Dave Golombek
Adding "yield" command [ reply ]  
2011-07-06 05:27
First, is this project still active, or has all work moved to https://github.com/mark-moseley/ruby-debug for 1.9 dev?

Assuming this is the right place for 1.8.x work, is there interest in addition of a new "yield" command (or some such), designed to automate stepping into the yielded block? This would be equivalent to (and the trivial implementation is basically the same as):
break __LINE__ + 1
next+
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