/** * @runInSeparateProcess */ public function testDebugger() { $debugger = Debugger::getInstance(); $this->assertFalse($debugger->isEnabled()); $debugger->disable(); $this->assertFalse($debugger->isEnabled()); $debugger->enable(); $this->assertTrue($debugger->isEnabled()); $debugger->__destruct(); }
<?php require_once __DIR__ . "/vendor/autoload.php"; use Drips\Debugger\Debugger; $debugger = Debugger::getInstance(); $debugger->enableErrors(); $debugger->enable(); // var_dump vs dump //var_dump($_SERVER); //dump($_SERVER); //die(); echo dump($debugger); echo "Test"; // eigene Fehlerbehandlung /* Handler::on("Exception", function(){ echo "Es ist ein Fehler aufgetreten"; return true; }); */ //throw new Exception("This is an exception!");
<?php use Drips\App; use Drips\Debugger\Debugger; if (class_exists('Drips\\App')) { App::on("create", function (App $app) { $app->debugger = Debugger::getInstance(); }); }