예제 #1
0
 /**
  * @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();
 }
예제 #2
0
파일: index.php 프로젝트: Prowect/Debugger
<?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!");
예제 #3
0
파일: drips.php 프로젝트: Prowect/Debugger
<?php

use Drips\App;
use Drips\Debugger\Debugger;
if (class_exists('Drips\\App')) {
    App::on("create", function (App $app) {
        $app->debugger = Debugger::getInstance();
    });
}