Triggernig the debugger

R

Ralph Shnelvar

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?
 
R

Ralph Shnelvar

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
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?
 
R

Robert Dober

/ruby-debug/processor.rb:17: warning: method redefined; discarding old inte=
rface=3D
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.



--=20
The best way to predict the future is to invent it.
-- Alan Kay
 
R

Robert Dober

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

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

RS> How can I do that in rdebug? =A0Is there a way other than setting bre=
akpoints manually when the program starts?
I found
=A0http://bashdb.sourceforge.net/ruby-debug.html#SEC18
and then placed

=A0require 'rubygems'
=A0require 'ruby-debug

into the source ...

but I still can't get the debugger to trigger. =A0 I get the following me= ssages ...


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 meth=
od `gcd' for Rational(1, 2):Rational' (NoMethodError)
=A0 =A0 =A0 =A0from F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/yaml.rb:396= :in `require'
=A0 =A0 =A0 =A0from F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/yaml.rb:396
=A0 =A0 =A0 =A0from UltraDedup.rb:4:in `require'
=A0 =A0 =A0 =A0from UltraDedup.rb:4
F:/InstantRails-2.0-win/ruby/lib/ruby/1.8/rational.rb:78: =A0 =A0gcd =3D = 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 inter=
face=3D
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.


--=20
The best way to predict the future is to invent it.
-- Alan Kay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top