5 host = ARGV[0] || 'localhost'
8 socket = TCPSocket.new(host, port)
9 puts "Connected to debugger on #{host}:#{port}"
10 prompt = "\nrbx:debug> "
12 readers, _, _ = IO.select([socket], nil, nil, 0.1)
14 response = CGI::unescape(socket.gets)
15 break if !response or response == "finished\n"
18 line = Readline.readline(prompt)
20 break if line =~ /exit/
21 response = CGI::unescape(socket.gets)
22 break if !response or response == "finished\n"