docs: def send(self, command, _id=None, result={}, frames=[], threads=None,
               error_messages=[], warning_messages=[], info_messages=[],
               exception=None):
          """ Build a message from parameters and send it to debugger.
          
          :param command: The command sent to the debugger client.
          :type command: str
          
          :param _id: Unique id of the sent message. Right now, it's always `None`
                      for messages by debugger to client.
          :type _id: int
          
          :param result: Used to send `exit_code` and updated `executionStatus` 
                         to debugger client.
          :type result: dict
          
          :param frames: contains the complete stack frames when debugger sends
                         the `programBreak` message.
          :type frames: list
  
          :param error_messages: A list of error messages the debugger client must
                                 display to the user.
          :type error_messages: list of str
          
          :param warning_messages: A list of warning messages the debugger client
                                   must display to the user.
          :type warning_messages: list of str
          
          :param info_messages: A list of info messages the debugger client must
                                 display to the user.
          :type info_messages: list of str
  
          :param exception: If debugger encounter an exception, this dict contains
                            2 keys: `type` and `info` (the later is the message).
          :type exception: dict
          """
          with self._connection_lock:
              payload = {
                  '_id': _id,
                  'command': command,
                  'result': result,
                  'commandExecStatus': 'ok',
                  'frames': frames,
                  'info_messages': info_messages,
                  'warning_messages': warning_messages,
                  'error_messages': error_messages,
                  'exception': exception
              }
              if threads:
                  payload['threads'] = threads
              msg = self.encode(payload)
              if self._connection:
                  msg_bytes = bytearray(msg, 'utf-8')
                  send_bytes_count = self._connection.sendall(msg_bytes)
                  self.log_sent(msg)
                  return send_bytes_count
              raise IKPdbConnectionError("Connection lost!")