You are here

public static function Dbug::debug in dBug for Drupal 8

Same name and namespace in other branches
  1. 2.0.x src/Dbug.php \Drupal\dbug\Dbug::debug()
  2. 1.0.x src/Dbug.php \Drupal\dbug\Dbug::debug()

Return the debug output.

Parameters

mixed $var: The variable to debug.

string $forceType: Variable type to be forced.

bool $bCollapsed: Collapse the result?

Return value

string The variable string representation.

File

src/Dbug.php, line 201

Class

Dbug
Implementation of dBug for Drupal.

Namespace

Drupal\dbug

Code

public static function debug($var, $forceType = "", $bCollapsed = FALSE) {
  $dbug = new self($var, $forceType, $bCollapsed);
  $output = $dbug->output;
  $output = implode(chr(10), $output);
  return Markup::create($output);
}