Class: Byebug::Context
- Inherits:
-
Object
- Object
- Byebug::Context
- Defined in:
- lib/byebug/context.rb
Instance Method Summary collapse
- #at_breakpoint(breakpoint) ⇒ Object
- #at_catchpoint(excpt) ⇒ Object
- #at_line(file, line) ⇒ Object
- #at_tracing(file, line) ⇒ Object
- #frame_args(frame_no = 0) ⇒ Object
- #frame_args_info ⇒ Object
- #frame_locals(frame_no = 0) ⇒ Object
- #handler ⇒ Object
Instance Method Details
#at_breakpoint(breakpoint) ⇒ Object
38 39 40 41 |
# File 'lib/byebug/context.rb', line 38 def at_breakpoint(breakpoint) handler.at_breakpoint(self, breakpoint) unless IGNORED_FILES.include?(breakpoint.source) end |
#at_catchpoint(excpt) ⇒ Object
43 44 45 |
# File 'lib/byebug/context.rb', line 43 def at_catchpoint(excpt) handler.at_catchpoint(self, excpt) end |
#at_line(file, line) ⇒ Object
51 52 53 |
# File 'lib/byebug/context.rb', line 51 def at_line(file, line) handler.at_line(self, file, line) unless IGNORED_FILES.include?(file) end |
#at_tracing(file, line) ⇒ Object
47 48 49 |
# File 'lib/byebug/context.rb', line 47 def at_tracing(file, line) handler.at_tracing(self, file, line) unless IGNORED_FILES.include?(file) end |
#frame_args(frame_no = 0) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/byebug/context.rb', line 11 def frame_args frame_no = 0 bind = frame_binding frame_no return [] unless eval "__method__", bind begin eval "self.method(__method__).parameters.map{|(attr, mid)| mid}", bind rescue NameError => e print "(WARNING: retreving args from frame #{frame_no} => " \ "#{e.class} Exception: #{e.})\n " return [] end end |
#frame_args_info ⇒ Object
28 29 30 31 32 |
# File 'lib/byebug/context.rb', line 28 def frame_args_info bind = frame_binding frame_no return [] unless eval "__method__", bind eval "self.method(__method__).parameters", bind end |
#frame_locals(frame_no = 0) ⇒ Object
23 24 25 26 |
# File 'lib/byebug/context.rb', line 23 def frame_locals frame_no = 0 bind = frame_binding frame_no eval "local_variables.inject({}){|h, v| h[v] = eval(v.to_s); h}", bind end |