public function writeDebug($key, $string)
    {
        if (is_null($this->responseDebug)) {
            $this->responseDebug = new ResponseBag();
            $this->response->add($this->responseDebug);
        }
        $this->responseDebug->add(['debug' => [$key => $string]]);
        ErrorHandler::getInstance()->addExtraInfo($key, serialize($string));
    }