Does Ruby have a stepwise debugger, similar to Perl's "perl -d"?
The ruby-debug (for ruby 1.8), debugger (for ruby 1.9), byebug (for ruby 2.0) and also the trepanning series all have an -x
or --trace
option. Inside the debuggers, the command set linetrace
will turn on or off line tracing. Here is the manual for ruby-debug
The original answer has been revised because the link to the datanoise article, alas, no longer works. Also added are the successors to ruby-debug
From the command line (if you have the debug
module available):
ruby -r debug /path/to/ruby_script.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With