11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/pry-moves/pry_wrapper.rb', line 11
def run
PryMoves.lock
initial_frame = PryMoves::BindingsStack.new(@pry_start_options).initial_frame
if not @pry_start_options[:pry_moves_loop] and initial_frame and
initial_frame.local_variable_defined? :debug_redirect
debug_redirect = initial_frame.local_variable_get(:debug_redirect)
PryMoves.messages << "⏩ redirected to #{debug_redirect}"
@command = {action: :step, binding: initial_frame}
else
start_pry
end
if @command
trace_command
else
PryMoves.unlock
if @pry_start_options[:pry_remote] && PryMoves.current_remote_server
PryMoves.current_remote_server.teardown
end
end
@return_value
end
|