Created
July 3, 2016 06:29
-
-
Save 1f7/bfc836f35e8fe1d8bcae5fbf4ee250d8 to your computer and use it in GitHub Desktop.
Tracy helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example: | |
class SomeClass extends SomeExtend | |
{ | |
use \Bla-Bla\Helpers\TracyTrait; | |
public function __construct() | |
{ | |
parent::__construct(); | |
... | |
... | |
} | |
} | |
$this->DBG($someVar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Bla-Bla\Helpers; | |
trait TracyTrait | |
{ | |
public function DBG($var='') | |
{ | |
\Tracy\Debugger::dump($var); | |
$t=debug_backtrace(1, 1); | |
//\Tracy\Debugger::barDump($t); | |
die('-- im in '.$t[0]['file'].', line: '.$t[0]['line'].' --'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment