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

On 8/20/07, TomRossi7 [email protected] 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?

Maybe because you can always type ‘irb’ once you hit a breakpoint or
are somehow in the ruby-debug console. You get a full irb with all the
environment you had up to that point whee you stopped. ‘exit’ takes
you back to (rdb:1) where you can set breakpoints, examine stuff look
at the stack frame and continue.

Ed

Thanks,
Tom


Ed Howland


“The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from all computers.”

Excellent! THANKS!

Also, if you issuing the command “set autoirb” will cause you to go
into irb every time the debugger is entered. In effect the debugger
issues that command. Personally I don’t use this, but it’s there.

What I do however use is “set autoeval” which instructs the debugger
to text that isn’t a debugger command like a Ruby expression. I put
this in my .rdebugrc to have this turned on by default. In the current
version in svn, .rdebugrc is also read via Debugger.debugger. Also the
current version in svn, those “set” commands are more gdb-like, so you
can say “set autoeval on” or “set autoeval off” and “show autoeval”
and get output in the format more or less as you would in gdb.

I’ve started a manual for the version of ruby-debug that’s in svn and
can be found at http://bashdb.sf.net/ruby-debug.html However since
there are a number of changes in the svn, I’m not sure how useful it
is for the last released version.

Awesome resource. Thank you!!

-bakki

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