         @emitter.emit('did-start-reading-typed-message')
 
   readTypedMessage: (buffer) ->
+    console.log buffer
+
     typedMessageXml = $($.parseXML(buffer)).find('message')
     typedMessage = {id: @constructor.getTypedMessageId()}
 


  updateTypedMessageBufferOnDidCreateNewLine: ->
    if @typedMessageBuffer?
      @typedMessageBuffer += "#{@typedMessageCurrentLineBuffer}\n"
      if @typedMessageCurrentLineBuffer.match(/^<\/message>/)?
        typedMessage = @readTypedMessage(@typedMessageBuffer)

  ## Writing typed messages to the terminal ------------------------------------

  writeTypedMessage: ({type,head,body,data}={}) ->
    headElem = ''
    bodyElem = ''
    if head or body
      startTag  = "<message type=\"#{type}\""
      startTag += " data-#{key}=\"#{value}\""  for key,value of data
