class Byebug::Command

def debug_eval(str, b = get_binding)

def debug_eval(str, b = get_binding)
  begin
    eval(str, b)
  rescue StandardError, ScriptError => e
    if Command.settings[:stack_trace_on_error]
      at = eval("caller(1)", b)
      print "#{at.shift}:#{e.to_s.sub(/\(eval\):1:(in `.*?':)?/, '')}"
      for i in at
        print "\tfrom #{i}\n"
      end
    else
      print "#{e.class} Exception: #{e.message}\n"
    end
  end
end