From: Logan Capaldo Date: 2006-02-24T10:42:07+09:00 Subject: Re: Q: How to initialize debugger's state when starting On Feb 23, 2006, at 7:53 PM, Matthias Georgi wrote: > A short hack. > Make a copy of debug.rb and put these lines right after the Context > class. > > class Context > alias original_readline readline > def readline(prompt, hist) > @rc_file ||= File.readlines("debug.rc") > if @rc_file.empty? > original_readline(prompt, hist) > else > @rc_file.shift > end > end > end > > Now create a file debug.rc with your desired breakpoint: > b 100 > b 200 > > Start the debugger: > ruby -r./debug myscript.rb > > Clever. I hope if someone comes up with a clean way to do this it gets merged in. It seems like a good idea.