def doDump(self, cmd):
    cmdtype, variable_name = self.getParameters(cmd)
    debug("doDump: "+cmdtype+" "+variable_name)
    if variable_name:
      # Note the space after "return" matters
      # self.writeToPUT("EXEC return (" + variable_name + ")\n")
      self.writeToPUT("DUMP return (" + variable_name + ")\n")
      dmpResponse = self.readFromPUT().strip()
      debug("dmpResponse: " + dmpResponse)
      dataMatches = re.search(r'^(\d+)[^0-9]*(\d+)$', dmpResponse)
      if dataMatches is not None:
        status = dataMatches.group(1)
        length = int(dataMatches.group(2))
        if status == "200":
          if length == 0:
            debugger_status("No "+cmd)
          else:
            dataStr = ""
            while len(dataStr) < length:
              dataStr += self.readFromPUT(int(length - len(dataStr)))

            dataStr = dataStr
            debug('dmpData: ' + dataStr)
            sublime.message_dialog(dataStr)
      else:
        debugger_status("Error getting variable value: " + dmpResponse)
    else:
      debugger_status("Usage: DUMP variable")
dataset/ETHPy150Open coronalabs/CoronaSDK-SublimeText/debugger.py/CoronaDebuggerThread.doDump/original