Class: PryMoves::Debug

Inherits:
TraceCommand show all
Defined in:
lib/commands/debug.rb

Instance Method Summary collapse

Methods inherited from TraceCommand

#initialize, #start_tracing, #stop_tracing, trace, #trace_obj, #traced_method?, #tracing_func

Methods included from TraceHelpers

#current_frame_digest, #current_frame_type, #debug_info, #frame_digest, #frame_type, #redirect_step?

Constructor Details

This class inherits a constructor from PryMoves::TraceCommand

Instance Method Details

#init(binding_) ⇒ Object



3
4
5
# File 'lib/commands/debug.rb', line 3

def init(binding_)
  #
end

#trace(event, file, line, method, binding_) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/commands/debug.rb', line 7

def trace(event, file, line, method, binding_)
  return if event != 'line' or @cancel_debug
  if @first_line_skipped
    if binding_.local_variable_defined?(:pry_cancel_debug)
      @cancel_debug = true
      return
    end
    true
  else
    @first_line_skipped = true
    false
  end
end