public function onConfig(Event $event)
    {
        $cfg = $event['config'];
        if (!isset($cfg['debug'])) {
            // no debug config values have changed
            return;
        }
        $cfg = $cfg['debug'];
        if (isset($cfg['file'])) {
            $this->debug->addPlugin($this->debug->output->file);
        }
        if (isset($cfg['onBootstrap'])) {
            if (!$this->debug->parentInstance) {
                // we're initializing
                $this->debug->eventManager->subscribe('debug.bootstrap', $cfg['onBootstrap']);
            } else {
                // boostrap has already occured, so go ahead and call
                \call_user_func($cfg['onBootstrap'], new Event($this->debug));
            }
        }
        if (isset($cfg['onLog'])) {
            /*
                Replace - not append - subscriber set via setCfg
            */
            if (isset($this->cfg['onLog'])) {
                $this->debug->eventManager->unsubscribe('debug.log', $this->cfg['onLog']);
            }
            $this->debug->eventManager->subscribe('debug.log', $cfg['onLog']);
        }
        if (!static::$profilingEnabled) {
            $cfg = $this->debug->getCfg('debug/*');
            if ($cfg['enableProfiling'] && $cfg['collect']) {
                static::$profilingEnabled = true;
                $pathsExclude = array(
                    __DIR__,
                );
                FileStreamWrapper::register($pathsExclude);
            }
        }
    }