Skip to content

Instantly share code, notes, and snippets.

@franciscoj
Created March 27, 2011 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franciscoj/889122 to your computer and use it in GitHub Desktop.
Save franciscoj/889122 to your computer and use it in GitHub Desktop.
A small ruby script to show how the ruby-debug works.
[-4, 5] in /projects/889122/small_script.rb
=> 1 dude = true
2
3 if dude
4 puts "Hey dude"
5 else
/projects/889122/small_script.rb:1
dude = true
(rdb:1)
ruby-debug help v0.10.4
Type 'help <command-name>' for help on a specific command
Available commands:
backtrace delete enable help method putl set trace
break disable eval info next quit show undisplay
catch display exit irb p reload step up
condition down finish kill pp restart thread var
continue edit frame list ps save tmate where
(rdb:1) help next
n[ext][+-]?[ nnn] step over once or nnn times,
'+' forces to move to another line.
'-' is the opposite of '+' and disables the force_stepping setting.
(rdb:1) _
dude = true
if dude
puts "Hey dude"
else
puts "Hello world"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment