Class: Byebug::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/byebug/context.rb

Instance Method Summary collapse

Instance Method Details

#at_breakpoint(breakpoint) ⇒ Object



31
32
33
# File 'lib/byebug/context.rb', line 31

def at_breakpoint(breakpoint)
  handler.at_breakpoint(self, breakpoint)
end

#at_catchpoint(excpt) ⇒ Object



35
36
37
# File 'lib/byebug/context.rb', line 35

def at_catchpoint(excpt)
  handler.at_catchpoint(self, excpt)
end

#at_line(file, line) ⇒ Object



43
44
45
# File 'lib/byebug/context.rb', line 43

def at_line(file, line)
  handler.at_line(self, file, line)
end

#at_return(file, line) ⇒ Object



47
48
49
# File 'lib/byebug/context.rb', line 47

def at_return(file, line)
  handler.at_return(self, file, line)
end

#at_tracing(file, line) ⇒ Object



39
40
41
# File 'lib/byebug/context.rb', line 39

def at_tracing(file, line)
  handler.at_tracing(self, file, line)
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.message})\n     "
    return []
  end
end

#handlerObject



27
28
29
# File 'lib/byebug/context.rb', line 27

def handler
  Byebug.handler or raise 'No interface loaded'
end

#interruptObject



23
24
25
# File 'lib/byebug/context.rb', line 23

def interrupt
  self.stop_next = 1
end