Skip to content

Instantly share code, notes, and snippets.

@leoallen85
Created February 28, 2013 16:49
Show Gist options
  • Save leoallen85/5058127 to your computer and use it in GitHub Desktop.
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
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