# Triggernig the debugger

**URL:** <https://www.ruby-forum.com/t/triggernig-the-debugger/191656>\
**Category:** Ruby\
**Created:** [July 15, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/triggernig-the-debugger/191656 "2010-07-15T21:50:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [July 15, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/triggernig-the-debugger/191656/1 "2010-07-15T21:50:42Z")

</div>

In Rails I can use the  
debugger  
statement to trigger the debugger.

How can I do that in rdebug? Is there a way other than setting  
breakpoints manually when the program starts?

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [July 15, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/triggernig-the-debugger/191656/2 "2010-07-15T22:05:21Z")

</div>

Thursday, July 15, 2010, 1:47:08 PM, you wrote:

RS\> In Rails I can use the  
RS\> debugger  
RS\> statement to trigger the debugger.

RS\> How can I do that in rdebug? Is there a way other than setting  
breakpoints manually when the program starts?

I found  
[ruby-debug](http://bashdb.sourceforge.net/ruby-debug.html#SEC18)  
and then placed

require ‘rubygems’  
require 'ruby-debug

into the source …

but I still can’t get the debugger to trigger. I get the following  
messages …

f:\UltraDedup\>ruby -r debug UltraDedup.rb  
Debug.rb  
Emacs support available.

UltraDedup.rb:3:require ‘fox16’  
(rdb:1) c  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/rational.rb:78: `undefined method `gcd’ for Rational(1, 2):Rational’ (NoMethodError)  
from F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/yaml.rb:396:in  
`require' from F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/yaml.rb:396 from UltraDedup.rb:4:in `require’  
from UltraDedup.rb:4  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/rational.rb:78: gcd =  
num.gcd(den)  
(rdb:1) c  
F:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/cli/ruby-debug/processor.rb:17:  
warning: method redefined; discarding old interface=  
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/debug.rb:945  
DEBUGGER\_\_.context.trace\_func event, file, line, id, binding, klass  
(rdb:1)

Any thoughts on how to trigger the debugger?

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [July 15, 2010, 10:22pm UTC](https://www.ruby-forum.com/t/triggernig-the-debugger/191656/3 "2010-07-15T22:22:56Z")

</div>

On Thu, Jul 15, 2010 at 10:05 PM, Ralph S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> and then placed  
> Debug.rb  
> (rdb:1) c  
> F:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/cli/ruby-debug/processor.rb:17: warning: method redefined; discarding old interface=  
> F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/debug.rb:945 DEBUGGER\_\_.context.trace\_func event, file, line, id, binding, klass  
> (rdb:1)
> 
> Any thoughts on how to trigger the debugger?  
> Exactly as you did, then you hit c for continue and that was what the  
> debugger did  
> try help to see how to step, trace, set breakpoints and some more  
> HTH  
> R.

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [July 15, 2010, 10:29pm UTC](https://www.ruby-forum.com/t/triggernig-the-debugger/191656/4 "2010-07-15T22:29:22Z")

</div>

On Thu, Jul 15, 2010 at 10:15 PM, Robert D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:
