# Ruby 1.9.0 and the debugger

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-0-and-the-debugger/126986>\
**Category:** Ruby\
**Created:** [January 23, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-the-debugger/126986 "2008-01-23T23:27:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [January 23, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-the-debugger/126986/1 "2008-01-23T23:27:30Z")

</div>

I’ve built Ruby 1.9 and all is well with that. With respects to using  
the debugger, the README says “use rb\_debug”. Now does that mean  
`require rb_debug` in an irb session or am I to recompile Ruby to  
include support for the debugger?

irb(main):004:0\> require rb\_debug.rb  
NameError: undefined local variable or method `rb_debug' for main:Object from (irb):4 from /usr/local/lib/ruby/1.9.0/irb.rb:150:in`block (2 levels)  
in eval\_input’ from /usr/local/lib/ruby/1.9.0/irb.rb:259:in  
`signal_status' from /usr/local/lib/ruby/1.9.0/irb.rb:147:in`block in  
eval\_input’ from /usr/local/lib/ruby/1.9.0/irb.rb:146:in `eval_input' from /usr/local/lib/ruby/1.9.0/irb.rb:70:in`block in start’  
from /usr/local/lib/ruby/1.9.0/irb.rb:69:in `catch' from /usr/local/lib/ruby/1.9.0/irb.rb:69:in`start’  
from /usr/local/bin/irb:13:in `’

I’ve tried to find some docs on this via ri debug:-

More than one method matched your request. You can refine  
your search by asking for information on one of:

```
 IRB::Context#debug_level=, IRB::Context#debug?, Logger#debug,
 Logger#debug?, Net::SMTP#debug_output=, Net::SMTP#set_debug_output,
 Net::HTTP#set_debug_output, Net::POP3#set_debug_output,
 Net::IMAP::debug=, Net::IMAP::debug, DEBUGGER__::debug_thread_info,
 DEBUGGER __#debug_silent_eval, DEBUGGER__ #debug_variable_info,
 DEBUGGER __#debug_funcname, DEBUGGER__ #debug_eval,
 DEBUGGER __#debug_method_info, DEBUGGER__ #debug_command,
 DEBUGGER__#debug_print_help, WEBrick::BasicLog#debug,
 WEBrick::BasicLog#debug?, Shell::debug=, Shell#debug=,
 RubyLex::debug?, Ripper#yydebug=, Ripper#yydebug

```

Regards,

John M.  
MSc (DIC)  
+44 7739 171 531

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [January 23, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-the-debugger/126986/2 "2008-01-23T23:39:12Z")

</div>

On Jan 23, 2008, at 5:26 PM, John M. wrote:

> I’ve built Ruby 1.9 and all is well with that. With respects to using  
> the debugger, the README says “use rb\_debug”. Now does that mean  
> `require rb_debug` in an irb session or am I to recompile Ruby to  
> include support for the debugger?
> 
> irb(main):004:0\> require rb\_debug.rb  
> NameError: undefined local variable or method `rb\_debug’ for  
> main:Object

require “rb\_debug.rb”

You need to have the quotes around it, because it takes a String 🙂

HTH,  
Ari

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [December 27, 2008, 7:25am UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-the-debugger/126986/3 "2008-12-27T07:25:19Z")

</div>

John M. wrote:

> I’ve built Ruby 1.9 and all is well with that. With respects to using  
> the debugger, the README says “use rb\_debug”. Now does that mean  
> `require rb_debug` in an irb session or am I to recompile Ruby to  
> include support for the debugger?

Ahh. For some reason I thought that since ruby-debug didn’t work with  
1.9 [yet] that there was no debugger for 1.9. But apparently there  
is–the default built-in [albeit slow] one. Silly me.

Note also that there’s “ruby unroller” if anybody wants to see the trace  
of their program executing:  
[http://unroller.rubyforge.org/](http://unroller.rubyforge.org/)

i.e.  
| | | call\_one  
| | | | return 3  
| | | more stuff

Cheers.  
-=r

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [January 25, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-the-debugger/126986/4 "2008-01-25T16:50:53Z")

</div>

In article [20080123222649.3e1df242@x60s](mailto:20080123222649.3e1df242@x60s),
