Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ruby debugger examples
class Buggy
# assuming perform_operation and special_options exist...
def buggy_method(param=nil, options={})
puts "\n\n\nDEBUG"
puts "param: #{param}"
puts "options: #{options}"
@instance_var = perform_operation(special_options(param, options))
end
end
class Buggy
# assuming perform_operation and special_options exist...
def buggy_method(param=nil, options={})
require 'ruby-debug'; debugger
@instance_var = perform_operation(special_options(param, options))
end
end
# Using MRI-1.9.2
gem install ruby-debug19
# Using MRI-1.8.7 or Ruby Enterprise Edition
gem install ruby-debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment