{{{ private static function debugStart()
495190
private static function debugStart($message)
    {
        // SWATDB_DEBUG is legacy, use SwatDB::setDebug() instead
        if (defined('SWATDB_DEBUG') || self::$debug) {
            $trace = debug_backtrace();

            // get first trace line that is not in the SwatDB package
            foreach ($trace as $entry) {
                if (
                    !array_key_exists('class', $entry) ||
                    strncmp($entry['class'], 'SwatDB', 6) !== 0
                ) {
                    break;
                }
            }

            $class = array_key_exists('class', $entry) ? $entry['class'] : null;

            $function = array_key_exists('function', $entry)
                ? $entry['function']
                : null;

            ob_start();
            printf(
                "<strong>%s%s%s()</strong><br />\n",
                $class === null ? '' : $class,
                array_key_exists('type', $entry) ? $entry['type'] : '',
                $function === null ? '' : $function
            );

            echo $message;
            $debug_message = ob_get_clean();

            $debug_info = array();
            $debug_info['message'] = $debug_message;
            $debug_info['time'] = microtime(true) * 1000;
            $debug_info['depth'] = self::$debug_wrapper_depth;
            $debug_info['count'] = self::$query_count;
            self::$debug_info[] = $debug_info;

            self::$debug_wrapper_depth++;
        }
    }
535619
protected function beforeStart()
    {
        // If no explicit request was given (via Enlighten::setRequest), create one based on the current PHP globals
        if (empty($this->request)) {
            $this->setRequest(Request::extractFromEnvironment());
        }

        $this->bootstrapRouter();
    }
78184
public function debug()
    {
        $oldActiveReport = (isset($GLOBALS["__ACTIVE_KOOLREPORT__"])) 
            ? $GLOBALS["__ACTIVE_KOOLREPORT__"] : null;
        $GLOBALS["__ACTIVE_KOOLREPORT__"] = $this;
        include dirname(__FILE__) . "/debug.view.php";
        if ($oldActiveReport === null) {
            unset($GLOBALS["__ACTIVE_KOOLREPORT__"]);
        } else {
            $GLOBALS["__ACTIVE_KOOLREPORT__"] = $oldActiveReport;
        }
    }
409763
public function debug($enabled = true)
    {
        if ($enabled === true) {
            $this->debug = $enabled;
            if ($this->dsql) {
                $this->dsql->debug($enabled);
            }
        } else {
            parent::debug($enabled);
        }

        return $this;
    }
368970
function debug(msg, error, extra) {
	if (!Manager.root.hasHandlers()) {
		basicConfig();
	}
	Manager.root.debug(msg, error, extra);
}
1078275
public function init() {

        $args = $this->console->arguments;

        $args->parse();

        if ( $args->defined('hardstart') ) {

            $this->hardstart();

        }

        if ( $args->defined('daemon') ) {

            $this->daemonize();

        } else if ( $args->defined('foreground') ) {

            if ( $args->defined('verbose') ) {
                $this->logger->pushHandler(new LogHandler());
            }

            $this->start();

        } else {

            $this->console->pad()->green()->usage();
            $this->end(0);

        }

    }
1008806
protected function start()
    {
        // Configure name of session (this will replace the PHPSESSID identifier for cookie ...)
        session_name($this->getIdentifier());

        $sessionId = $this->getId();

        if (null !== $sessionId) {
            session_id($sessionId);
        }

        // set params for cookie!
        session_set_cookie_params(
            $this->getLifetime(),
            $this->retrievePathToCurrentClass(),
            $this->getDomain(),
            $this->getSsl(),
            $this->getHttpOnly()
        );

        $this->setStarted(session_start());

        if (null === $sessionId) {
            $sessionId = session_id();
            $this->setId($sessionId);
        }

        // Check stack for functions to execute
        $callStack = $this->callStack['start'];

        // Iterate over callstack
        foreach ($callStack as $call) {
            call_user_func([$call[0], $call[1]]);
        }

        // log created session-id and defined session parameter (cookie params)
        $this->getLogger()->debug(
            'session-id: '.$sessionId.' session-cookie-parameter: '.
            var_export(
                session_get_cookie_params(),
                true
            )
        );
    }
583290
public static function debug() {
		?>
				<div class="wrap">
						<h2> <?php esc_html_e( 'Parse This Debugger', 'indieweb-post-kinds' ); ?> </h2>
						<p> <?php esc_html_e( 'Test the Parse Tools Debugger. You can report sites to the developer for possibly improvement in future', 'parse-this' ); ?>
						</p>
						<a href="https://github.com/dshanske/parse-this/issues"><?php esc_html_e( 'Open an Issue', 'parse-this' ); ?></a>
							<p> 
							<?php
							if ( is_plugin_active( 'parse-this/parse-this.php' ) ) {
								esc_html_e( 'You are using the plugin version of Parse This as opposed to a version built into any plugin', 'parse-this' );
							}
							?>
						<hr />
			<form method="get" action="<?php echo esc_url( rest_url( '/parse-this/1.0/parse/' ) ); ?> ">
			<p><label for="url"><?php esc_html_e( 'URL', 'indieweb-post-kinds' ); ?></label><input type="url" class="widefat" name="url" id="url" /></p>
			<p><label for="mf2"><?php esc_html_e( 'MF2', 'indieweb-post-kinds' ); ?></label><input type="checkbox" name="mf2" id="mf2" /></p>
			<p><label for="discovery"><?php esc_html_e( 'Feed Discovery', 'indieweb-post-kinds' ); ?></label><input type="checkbox" name="discovery" id="discovery" /></p>
			<p><label for"return"><?php esc_html_e( 'Return Type', 'indieweb-post-kinds' ); ?></label>
				<select name="return">
					<option value="single"><?php esc_html_e( 'Single', 'indieweb-post-kinds' ); ?></option>
					<option value="feed"><?php esc_html_e( 'Feed', 'indieweb-post-kinds' ); ?></option>
				</select>
			</p>
			<p><label for="follow"><?php esc_html_e( 'Follow Author Links', 'indieweb-post-kinds' ); ?></label><input type="checkbox" name="follow" id="follow" /></p>
			<?php wp_nonce_field( 'wp_rest' ); ?>
			<?php submit_button( __( 'Parse', 'indieweb-post-kinds' ) ); ?>
						</form>
				</div>
				<?php
	}
793342
public function start($debug = false, $startLoop = true)
    {
        if (!$debug) {
            Logger::set(new NullLogger());
        }

        parent::start($startLoop);
    }
1312351
private function _processFunctionStart() {
		$this->_inFunction = true;
		$this->_cyclomaticComplexity = 1;
		$this->_npathComplexity = 0;
		$this->_functionLevel = $this->statementStack->count();
		$this->_justAfterFuncStmt = false;

		$this->_functionStartLine = $this->lineNumber;

		// Check the position of the open curly after the function declaration
		if ($this->_isActive('funcDefinitionOpenCurly')) {
			$pos = $this->_config->getTestProperty('funcDefinitionOpenCurly', 'position');

			$currentToken = $this->tokenizer->getCurrentToken();
			$previousToken = $this->tokenizer->peekPrvsValidToken();

			if ($pos === NEW_LINE) {
				// The previous token should be on the previous line
				$isPosOk = ($previousToken->line < $currentToken->line);
			} else {
				// The previous token should be on the same line
				$isPosOk = ($previousToken->line === $currentToken->line);
			}

			if (!$isPosOk) {
				$tmp = ($pos === SAME_LINE) ? "the previous line." : "a new line.";
				$msg = $this->_getMessage('LEFT_CURLY_POS', $tmp);
				$this->_writeError('funcDefinitionOpenCurly', $msg);
			}
		}
	}
355425
public static function start()
    {

        static::$time = microtime(true);
        static::$memory = memory_get_usage(true);

        self::log(static::$time, _t("Start execution time"), "info");
    }
415497
protected function registerDebugger(): void
    {
        $this->app->singleton('orchestra.debug', function ($app) {
            return new Debugger($app->make(ProfilerContract::class), $app->make('orchestra.debug.socket'));
        });
    }
1041542
public static function startup()
    {

        // setup STDOUT and STDERR defaults
        self::initializeOutputStreams();

        // some init stuff
        self::getTimer()->start();

        self::setSystemConstants();
        self::setIncludePaths();
        self::setIni();
    }
736915
function startup()
    {
        error_reporting( E_ALL & ~E_DEPRECATED );

        eZDebug::setHandleType( eZDebug::HANDLE_TO_PHP );

        if ( php_sapi_name() != 'cli' )
        {
            $cli = eZCLI::instance();
            $cli->output( "PHP is currently using the '" . php_sapi_name() . "' interface. Make sure it is using the 'cli' interface." );
            exit( 1 );
        }

        $ini = eZINI::instance();
        $phpLocale = trim( $ini->variable( 'RegionalSettings', 'SystemLocale' ) );
        if ( $phpLocale != '' )
        {
            setlocale( LC_ALL, explode( ',', $phpLocale ) );
        }

        // Set correct site timezone
        $timezone = $ini->variable( "TimeZoneSettings", "TimeZone" );
        if ( $timezone )
        {
            date_default_timezone_set( $timezone );
        }

        // Check if the current system user is allowed to execute the script
        $fileIni = eZINI::instance( 'file.ini' );
        $checkSystemUser = $fileIni->variable( 'FileSettings', 'SystemUserCheck' ) == 'enabled' ;
        if ( $checkSystemUser && function_exists( 'posix_geteuid' ) )
        {
            $currentUser = posix_getpwuid( posix_geteuid() );
            $requiredUser = $fileIni->variable( 'FileSettings', 'RequiredSystemUser' );
            if ( $currentUser['name'] !== $requiredUser )
            {
                $cli = eZCLI::instance();
                $cli->error( "Scripts must be executed as '{$requiredUser}'." );
                exit( 1 );
            }
        }
    }
498587
public function debug()
    {
        $print = "Lazer::table(" . $this->name . ")\n";
        foreach ($this->pending as $function => $values)
        {
            if (!empty($values))
            {

                if (is_array($values))
                {
                    if (is_array(reset($values)))
                    {
                        foreach ($values as $value)
                        {
                            if ($function == 'where')
                            {
                                array_shift($value);
                            }
                            if ($function == 'with')
                            {
                                $params = implode(':', $value);
                            }
                            else
                            {
                                $params = implode(', ', $value);
                            }
                            $print .= "\t" . '->' . $function . '(' . $params . ')' . "\n";
                        }
                    }
                    else
                    {
                        $params = implode(', ', $values);
                        $print .= "\t" . '->' . $function . '(' . $params . ')' . "\n";
                    }
                }
                else
                {
                    $print .= "\t" . '->' . $function . '(' . $values . ')' . "\n";
                }
            }
        }
        echo '<pre>' . print_r($print, true) . '</pre>';
        $this->clearQuery();
    }
781594
public function onInit()
    {
        $func = Util::get($this->params, '{init}', null);
        if (is_callable($func)) {
            $this->mapState = $func($data);
        }
    }
784623
def enable_debug(self):
        
        if self.args.foreground:
            self.config.application[config.DEBUG] = True