module Byebug
def start_client(host = 'localhost', port = PORT)
Connects to the remote byebug
def start_client(host = 'localhost', port = PORT) interface = LocalInterface.new puts 'Connecting to byebug server...' socket = TCPSocket.new(host, port) puts 'Connected.' while (line = socket.gets) case line when /^PROMPT (.*)$/ input = interface.read_command(Regexp.last_match[1]) break unless input socket.puts input when /^CONFIRM (.*)$/ input = interface.readline(Regexp.last_match[1]) break unless input socket.puts input else puts line end end socket.close end