Ruby-debug vs. breakpoint

Okay, so it looks like getting the ole “breakpoint” working isn’t
going to happen. Everyone seems to just push for making the switch
over to “ruby-debug”. I’ve decided to go with the flow, but have to
say that I feel like I’m giving up a lot. The nice thing about a
breakpoint was it dropped you into the IRB where you could interact
with your code by entering in code that is immediately executed
bringing back the results. With ruby-debug, this doesn’t seem
possible. Why aren’t more people upset about the switch? Am I
missing something?

Thanks,
Tom

TomRossi7 wrote:

Okay, so it looks like getting the ole “breakpoint” working isn’t
going to happen. Everyone seems to just push for making the switch
over to “ruby-debug”. I’ve decided to go with the flow, but have to
say that I feel like I’m giving up a lot. The nice thing about a
breakpoint was it dropped you into the IRB where you could interact
with your code by entering in code that is immediately executed
bringing back the results. With ruby-debug, this doesn’t seem
possible. Why aren’t more people upset about the switch? Am I
missing something?

Just require ‘ruby-debug’ and you have the same functionality as you had
with breakpoint library.

You might use either ‘debugger’ call or old ‘breakpoint’ call (aliased
since ruby-debug 0.9.3) in your code.

If you do not want to write 'eval ’ (or just 'e ') you might
you ‘set autoeval’. Then just write in your code and it is
evaluated automatically.

breakpointer was deprecated also in Rails:

http://debug-commons.rubyforge.org/misc/ruby-debugging.html#breakpointer

Regards,
m.

On Aug 20, 2007, at 4:25 PM, TomRossi7 wrote:

Okay, so it looks like getting the ole “breakpoint” working isn’t
going to happen. Everyone seems to just push for making the switch
over to “ruby-debug”. I’ve decided to go with the flow, but have to
say that I feel like I’m giving up a lot. The nice thing about a
breakpoint was it dropped you into the IRB where you could interact
with your code by entering in code that is immediately executed
bringing back the results. With ruby-debug, this doesn’t seem
possible. Why aren’t more people upset about the switch? Am I
missing something?

You can type irb at a ruby-debug prompt to drop into a breakpoint
style session.

James Edward G. II

On Aug 21, 8:11 am, Martin K. [email protected] wrote:

breakpointer was deprecated also in Rails:

http://debug-commons.rubyforge.org/misc/ruby-debugging.html#breakpointer

Regards,
m.

One thing that I’ve found is that you can’t use rdebug in a test/unit
test. If the breakpoint is in a class that is invoked within an
assertion, it’s caught. I toyed with implementing a tool to allow me
to break within a unit test, but wasn’t sure it would be worth the
work.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs