protected static function debugFormatString($value) {
    $res = "";
    if (!empty($value)) {
      foreach (str_split($value) as $c) {
        $res .= ProtocolMessage::escapeByte($c);
      }
    }
    return '"' . $res . '"';
  }