WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_CLI::debug() public WP-CLI 1.0

Display debug message prefixed with "Debug: " when --debug is used.

Debug message is written to STDERR, and includes script execution time.

Helpful for optionally showing greater detail when needed. Used throughout WP-CLI bootstrap process for easier debugging and profiling.

# Called in `WP_CLI\Runner::set_wp_root()`.
private static function set_wp_root( $path ) {
	define( 'ABSPATH', Utils\trailingslashit( $path ) );
	WP_CLI::debug( 'ABSPATH defined: ' . ABSPATH );
	$_SERVER['DOCUMENT_ROOT'] = realpath( $path );
}

# Debug details only appear when `--debug` is used.
# $ wp --debug
# [...]
# Debug: ABSPATH defined: /srv/www/wordpress-develop.dev/src/ (0.225s)

{} Это метод класса: WP_CLI{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$result = WP_CLI::debug( $message, $group );
$message(строка|WP_Error|Exception|Throwable) (обязательный)
Message to write to STDERR.
$group(строка|true|false)
Organize debug message to a specific group. Use false to not group the message.
По умолчанию: false

Код WP_CLI::debug() WP-CLI 2.5.0

public static function debug( $message, $group = false ) {
	static $storage = [];

	if ( ! self::$logger ) {
		$storage[] = [ $message, $group ];
		return;
	}

	if ( ! empty( $storage ) && self::$logger ) {
		foreach ( $storage as $entry ) {
			list( $stored_message, $stored_group ) = $entry;
			self::$logger->debug( self::error_to_string( $stored_message ), $stored_group );
		}
		$storage = [];
	}

	self::$logger->debug( self::error_to_string( $message ), $group );
}