# Ruby-debug vs. breakpoint

**URL:** <https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/112562>\
**Category:** Ruby\
**Created:** [August 20, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/112562 "2007-08-20T23:27:32Z")\
**Posts on this page:** 4\
**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:27pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/112562/1 "2007-08-20T23:27:32Z")

</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 21, 2007, 2:14pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/112562/2 "2007-08-21T14:14:15Z")

</div>

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](http://debug-commons.rubyforge.org/misc/ruby-debugging.html#breakpointer)

Regards,  
m.

---

<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, 5:17pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/112562/3 "2007-08-21T17:17:57Z")

</div>

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

---

<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, 5:26pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/112562/4 "2007-08-21T17:26:00Z")

</div>

On Aug 21, 8:11 am, Martin K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> breakpointer was deprecated also in Rails:
> 
> [http://debug-commons.rubyforge.org/misc/ruby-debugging.html#breakpointer](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.
