1

I would like to evaluate

def foo
  puts "you done got fooed"
end

in the ruby-debug console. It works fine fine with irb. But in ruby-debug, I can't get the reader to continue reading input after a newline.

I've even tried ending the line in a backslash.

event_jr
  • 17,467
  • 4
  • 47
  • 62

1 Answers1

7

you can enter irb from rdebug:

(rdb:1) irb
irb(main):001:0> self
=> main
irb(main):002:0> def foo
irb(main):003:1> puts "foo!"
irb(main):004:1> end
=> nil
irb(main):005:0> exit
(rdb:1) p foo
foo!
nil
(rdb:1)
Michael Slade
  • 13,802
  • 2
  • 39
  • 44