Class: PryMoves::NextBreakpoint

Inherits:
TraceCommand show all
Defined in:
lib/commands/next_breakpoint.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
# File 'lib/commands/next_breakpoint.rb', line 3

def init(binding_)
end

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



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

def trace(event, file, line, method, binding_)
  # this command will stuck in tracing when no breakpoint met (usually)
  PryMoves.messages << "⚠️  Command NextBreakpoint is not implemented"
  return true

  if binding_.local_variable_defined?(:pry_breakpoint) and
      binding_.local_variable_get(:pry_breakpoint)
    binding_.local_variable_set :pry_breakpoint, nil # reset breakpoint at visited method instance
    true
  end

  # if method.to_s.include? "debug"
  #   @pry_start_options[:initial_frame] = 1
  #   true
  # end
end