Created
February 28, 2013 16:49
-
-
Save leoallen85/5058127 to your computer and use it in GitHub Desktop.
A simple example just to show you how to set break points using Ruby debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'debugger' | |
class Hello | |
def hi_there | |
debugger | |
puts "wohoo" | |
end | |
end | |
testing = Hello.new | |
puts "here" | |
# This will break the code here | |
# You can carry on running the code by pressing | |
# continue or c. | |
# If you can't run the code, run `set autoeval` although you can set this up in a .rdebugrc | |
debugger | |
puts "there" | |
testing.hi_there | |
testing.hi_there |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment