class DEBUGGER__::Session
def process_command line
def process_command line if line.empty? if @repl_prev_line line = @repl_prev_line else return :retry end else @repl_prev_line = line end /([^\s]+)(?:\s+(.+))?/ =~ line cmd_name, cmd_arg = $1, $2 if cmd = @commands[cmd_name] check_postmortem if !cmd.postmortem check_unsafe if cmd.unsafe cancel_auto_continue if cmd.cancel_auto_continue @repl_prev_line = nil if !cmd.repeat cmd.block.call(cmd_arg) else @repl_prev_line = nil check_unsafe request_eval :pp, line end rescue Interrupt return :retry rescue SystemExit raise rescue PostmortemError => e @ui.puts e.message return :retry rescue Exception => e @ui.puts "[REPL ERROR] #{e.inspect}" @ui.puts e.backtrace.map{|e| ' ' + e} return :retry end