@param array $debugger

@throws RuntimeException
330042
public function merge($debugger) {
		if (!is_array($this->data)) {
			throw new RuntimeException('Data is not an array');
		} else if (!is_array($debugger)) {
			throw new InvalidArgumentException('Argument is not an array');
		} else {
			$this->data = array_merge_recursive($this->data, $debugger);
		}
	}
597732
public function setDebug($debugMode)
  {
    $this->_debug = $debugMode;
    if (isset($this->_connectionSwitcher)) {
      $this->_connectionSwitcher->setDebug($debugMode);
    }
  }
948537
public function connect($debug = false)
    {
        if (isset($this->options['dsn'])) {
            if ($this->options['verbose']) {
                echo "<p>Connecting to dsn:<br><code>" . $this->options['dsn'] . "</code>";
            }

            try {
                $this->db = new \PDO(
                    $this->options['dsn'],
                    $this->options['username'],
                    $this->options['password'],
                    $this->options['driver_options']
                );

                $this->db->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, $this->options['fetch_mode']);
                $this->db->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);

            } catch(\Exception $e) {

                if ($debug || $this->options['debug_connect']) {
                    // For debug purpose, shows all connection details
                    throw $e;
                } else {
                    // Hide connection details.
                    throw new \PDOException("Could not connect to database, hiding connection details. Connect using 'debug' to see the full exception message.");
                }
            }

        } else {
            throw new \Exception("You can not connect, missing dsn.");
        }

        $this->loadHistory();
    }
954901
private function debugQuery(QueryDebugger $queryDebugger = null)
    {
        if ($queryDebugger === null) {
            return;
        }

        $queryDebugger->stop();

        $this->getConfiguration()->getEventDispatcher()->dispatch(
            Events::QUERY_DEBUG,
            new QueryDebugEvent($queryDebugger)
        );
    }
1231892
public function getQueue(Debugger $debugger)
    {
        /** @var \Indatus\Dispatcher\Queue $queue */
        $queue = App::make('Indatus\Dispatcher\Queue');

        /** @var \Indatus\Dispatcher\Scheduling\ScheduledCommandInterface $command */
        foreach ($this->getScheduledCommands() as $command) {
            /** @var \Indatus\Dispatcher\Scheduling\Schedulable $scheduler */
            $scheduler = App::make('Indatus\Dispatcher\Scheduling\Schedulable');

            //could be multiple schedules based on arguments
            $schedules = $command->schedule($scheduler);
            if (!is_array($schedules)) {
                $schedules = [$schedules];
            }

            $willBeRun = false;
            foreach ($schedules as $schedule) {
                if (($schedule instanceof Schedulable) === false) {
                    $msg = 'Schedule for "'.$command->getName().'" is not an instance of Schedulable';
                    throw new \InvalidArgumentException($msg);
                }

                if ($this->isDue($schedule)) {
                    /** @var \Indatus\Dispatcher\QueueItem $queueItem */
                    $queueItem = App::make('Indatus\Dispatcher\QueueItem');

                    $queueItem->setCommand($command);
                    $queueItem->setScheduler($schedule);

                    if ($queue->add($queueItem)) {
                        $willBeRun = true;
                    }
                }
            }

            //it didn't run, so record that it didn't run
            if ($willBeRun === false) {
                $debugger->commandNotRun($command, 'No schedules were due');
            }
        }

        return $queue;
    }
84642
protected function debugPrint($msg)
    {
        if ($this->logger) {
            $this->logger->debug("$msg\n");
        } else {
            parent::debugPrint($msg);
        }
    }
983568
public static function register($debug = TRUE, $charset = 'UTF-8') {

		if(self::$handler) {
			throw new \RuntimeException('Exception handler already registered.');
		}
		
		self::$handler = new static($debug, $charset);
			
		set_exception_handler(array(self::$handler, 'handle'));

		return self::$handler;

	}
1089264
public function setDebug($debug)
	{
		$this->debug = $debug;
		$this->langkeyValidator->setDebug($debug);
		return $this;
	}
484671
private void setupDebugger(Debugger debugger) {
        if (debugger == null) {
            return;
        }

        this.debugger = debugger;
        JSObject globalObject = getGlobalContext().getObject();
        String debuggerName = getRuntime().getConfig().getExposeDebugAs();
        Object currentDebugger = globalObject.get(this, debuggerName);
        if (!(currentDebugger instanceof DebuggerAPI)) {
            DebuggerAPI api = new DebuggerAPI(getGlobalContext(), debugger);
            globalObject.put(this, debuggerName, api, false);
        }
    }
415497
protected function registerDebugger(): void
    {
        $this->app->singleton('orchestra.debug', function ($app) {
            return new Debugger($app->make(ProfilerContract::class), $app->make('orchestra.debug.socket'));
        });
    }
246397
public function setDebug($debug)
    {
        //====================================================================//
        // Change Parameter State
        $this->debug = $debug;
        //====================================================================//
        // Delete Existing Debug Messages
        if ((0 == $debug) && isset($this->debug)) {
            $this->deb = array();
        }

        return true;
    }
1345361
public function setDebugFile($debugFile) {
		$this->debugFile = $debugFile;
		$this->serializer->setDebugFile($debugFile);
		return $this;
	}
1282478
public function debug(string $msg) {
		if ($this->level > self::DEBUG)
			return;
		$this->write('DEB', $msg);
	}
641079
public function deployCommand($debug = false)
    {
        $this->outputLine('<b>Run deploy hook commands</b>');
        $this->commandService->executeHooks($this->deployHooks, function (...$args) { $this->outputLine(...$args); } );
    }
1103472
public function dispatchDebug($data, $tags = null, $ignoreTraceCalls = 0) {
		if($this->isActive()) {
			$message = new DebugMessage();
			$message->data = $this->dumper->dump($data);
			if($tags) {
				$message->tags = explode('.', $tags);
			}
			if($this->detectTraceAndSource && $ignoreTraceCalls !== null) {
				$message->trace = $this->fetchTrace(debug_backtrace(), $message->file, $message->line, $ignoreTraceCalls);
			}
			$this->sendMessage($message);
		}
	}
1117475
public static void debug(boolean debug) {
        NotificationCenter.DBG =
            NotificationEffect.DBG =
            NotificationBuilder.DBG =
            NotificationEntry.DBG =
            NotificationHandler.DBG =
            NotificationRemote.DBG =
            NotificationRemoteCallback.DBG =
            NotificationLocal.DBG =
            NotificationGlobal.DBG =
            NotificationView.DBG =
            NotificationViewCallback.DBG =
            NotificationRootView.DBG =
            NotificationBoard.DBG =
            NotificationBoardCallback.DBG =
            ViewWrapper.DBG =
            ViewSwitcherWrapper.DBG =
            ChildViewManager.DBG =
            DBG = debug;
    }
559742
public function listDebuggees(array $args = [])
    {
        return $this->send([$this->debuggerClient, 'listDebuggees'], [
            $this->pluck('project', $args),
            DebuggerClient::getDefaultAgentVersion(),
            $args
        ]);
    }