/** * @param string $rootDir */ private function setupDebugging($rootDir) { // Disabled the shutdown handler to prever interference with Symfony console's error handling. // register_shutdown_function ([$this, 'shutdown']); set_error_handler([$this, 'errorHandler']); set_exception_handler([$this, 'exceptionHandler']); $this->injector->defineParam('devEnv', false); $this->injector->defineParam('webConsole', false); }
/** * @param string $rootDir */ private function setupDebugging($rootDir) { set_exception_handler([$this, 'exceptionHandler']); $devEnv = env('DEV'); $this->injector->defineParam('devEnv', $devEnv); $webConsole = env('CONSOLE'); $this->injector->defineParam('webConsole', $webConsole); ErrorConsole::init($devEnv, $rootDir); ErrorConsole::setAppName($this->kernelSettings->appName); // Note: the editorUrl can't be set yet. See: WebServer. $settings = new DebugConsoleSettings(); $settings->defaultPanelTitle = 'Inspector'; $settings->defaultPanelIcon = 'fa fa-search'; DebugConsole::init($devEnv, $settings); // Temporarily set framework path mapping here for errors thrown during modules loading. ErrorConsole::setPathsMap($this->kernelSettings->getMainPathMap()); }