Class: PryRemote::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-debugger-jruby/pry_remote_ext.rb

Instance Method Summary collapse

Instance Method Details

#runObject

Override the call to Pry.start to save off current Server, and not teardown the server right after Pry.start finishes.



7
8
9
10
11
12
13
14
15
16
# File 'lib/pry-debugger-jruby/pry_remote_ext.rb', line 7

def run
  if PryDebuggerJRuby.current_remote_server
    raise 'Already running a pry-remote session!'
  else
    PryDebuggerJRuby.current_remote_server = self
  end

  setup
  Pry.start(@object, input: client.input_proxy, output: client.output)
end

#teardown_with_pry_debuggerObject Also known as: teardown



20
21
22
23
24
25
26
# File 'lib/pry-debugger-jruby/pry_remote_ext.rb', line 20

def teardown_with_pry_debugger
  return if @torn

  teardown_without_pry_debugger
  PryDebuggerJRuby.current_remote_server = nil
  @torn = true
end