From Wikibooks, open books for an open world
1. The first kind of line-by-line ruby debugging tool is called irb. The call of irb be made by command line, by the command:
irb script_name.rb
2. Ruby has also a “pure ruby” debugger built right in. To use it:
ruby -rdebug script_name.rb
or
require 'debug' #somewhere in your script
If you’re on MRI, it is probably far recommended to use ruby-debug gem (which is in C, so faster), or, on 1.9, ruby-debug19 gem (same as ruby-debug gem, but written for 1.9). See a list of differences.
3. However, another options are available: a common alternative involves the optional gem "pry". Also in this case, the file to be debugged need the require instruction at the file top.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4