method
trace_func
v2_4_6 -
Show latest stable
- Class:
DEBUGGER__
trace_func(event, file, line, id, binding, klass)public
No documentation available.
# File lib/debug.rb, line 841
def trace_func(event, file, line, id, binding, klass)
Tracer.trace_func(event, file, line, id, binding, klass) if trace?
context(Thread.current).check_suspend
@file = file
@line = line
case event
when 'line'
frame_set_pos(file, line)
if !@no_step or @frames.size == @no_step
@stop_next -= 1
@stop_next = -1 if @stop_next < 0
elsif @frames.size < @no_step
@stop_next = 0 # break here before leaving...
else
# nothing to do. skipped.
end
if @stop_next == 0 or check_break_points(file, nil, line, binding, id)
@no_step = nil
suspend_all
debug_command(file, line, id, binding)
end
when 'call'
@frames.unshift [binding, file, line, id]
if check_break_points(file, klass, id.id2name, binding, id)
suspend_all
debug_command(file, line, id, binding)
end
when 'c-call'
frame_set_pos(file, line)
when 'class'
@frames.unshift [binding, file, line, id]
when 'return', 'end'
if @frames.size == @finish_pos
@stop_next = 1
@finish_pos = 0
end
@frames.shift
when 'raise'
excn_handle(file, line, id, binding)
end
@last_file = file
end