When stepping through the Ruby Debugger in Rails, how do I only have it stop only at code that I wrote, skipping over all the native Rails code?
(ie skipping all the code that looks like this)
/Users/jon/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/core_ext/module/remove_method.rb:4
remove_method(method)
(rdb:1) s
[76, 85] in /Users/jon/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/core_ext/class/attribute.rb
76 def self.#{name}?() !!#{name} end
77
78 def self.#{name}=(val)
79 singleton_class.class_eval do
80 remove_possible_method(:#{name})
=> 81 define_method(:#{name}) { val }
82 end
83
84 if singleton_class?
85 class_eval do
/Users/jon/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/core_ext/class/attribute.rb:81
define_method(:#{name}) { val }
(rdb:1) s
[79, 88] in /Users/jon/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/core_ext/class/attribute.rb
79 singleton_class.class_eval do
80 remove_possible_method(:#{name})
81 define_method(:#{name}) { val }
82 end
83
=> 84 if singleton_class?
85 class_eval do
86 remove_possible_method(:#{name})
87 def #{name}
88 defined?(@#{name}) ? @#{name} : singleton_class.#{name}
Thanks!
I think what your looking for is something like this if I understand your question right. You'll want to step over rather than step into, that way if your using a method for rails you don't go into the rails code. I hope this helps and good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With