module Byebug
def start_client(host = 'localhost', port = PORT)
Connects to the remote byebug
def start_client(host = 'localhost', port = PORT) interface = Byebug::LocalInterface.new socket = TCPSocket.new(host, port) puts "Connected." catch(:exit) do while (line = socket.gets) case line when /^PROMPT (.*)$/ input = interface.read_command($1) throw :exit unless input socket.puts input when /^CONFIRM (.*)$/ input = interface.confirm($1) throw :exit unless input socket.puts input else print line end end end socket.close end