# Ruby-debug vs. breakpoint

**URL:** <https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438>\
**Category:** Rails\
**Created:** [August 20, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438 "2007-08-20T23:25:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 20, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438/1 "2007-08-20T23:25:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 20, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438/2 "2007-08-20T23:36:33Z")

</div>

On 8/20/07, TomRossi7 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

> **[Green Programming](http://greenprogrammer.blogspot.com)**
>
> Environmentally safe code

“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.”

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 21, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438/3 "2007-08-21T23:13:56Z")

</div>

Excellent! THANKS!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438/4 "2007-09-25T23:10:29Z")

</div>

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 [ruby-debug](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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438/5 "2007-09-25T23:10:53Z")

</div>

Awesome resource. Thank you!!

-bakki
