Alex Gutteridge
5/25/2007 3:02:00 AM
On 25 May 2007, at 11:37, Jorge Domenico Bucaran Romano wrote:
> Tomas Pospisek's Mailing Lists wrote:
>> On Fri, 25 May 2007, How do I use the ruby default debugger? wrote:
>>
>>> How do I use the ruby default debugger?
>>
>> $ ruby -rdebug /tmp/some_ruby_program.rb
>> Debug.rb
>> Emacs support available.
>>
>> /tmp/k.rb:1:puts "a"
>> (rdb:1) help
>> Debugger help v.-0.002b
>> Commands
>> --
[snip]
>
> Look what happened when I did just that:
>
>
> C:\Users\jbucaran>ruby -rdebug
> c:\users\jbucaran\desktop\demo2.rb
> Debug.rb
> Emacs support available.
>
> C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:require
> 'rubygems'
> (rdb:1)
>
> Help me I am clueless!
The debugger is running and now you need to use it. Type help (as
shown above) to get a list of commands. You probably want to set
breakpoints at certain places in your script and then continue to
there using 'c' before you step through using 'n' or 's'. Googling
for 'ruby debugger' gives me the Pickaxe chapter on debugging which
is a good starting point if none of this makes sense.
Alex Gutteridge
Bioinformatics Center
Kyoto University