Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated Nette\Debugger

  • Loading branch information...
commit c08918e0342d1e1411c739c1bd124126f25fb5f4 1 parent c385888
David Grudl authored
6 dibi/Nette/DibiNettePanel.php
View
@@ -49,18 +49,20 @@ public function __construct($explain = TRUE, $filter = NULL)
public function register(DibiConnection $connection)
{
+ static $done;
if (is_callable('Nette\Diagnostics\Debugger::enable') && !class_exists('NDebugger')) {
class_alias('Nette\Diagnostics\Debugger', 'NDebugger'); // PHP 5.2 code compatibility
}
if (is_callable('NDebugger::enable')) {
NDebugger::$bar && NDebugger::$bar->addPanel($this);
- NDebugger::$blueScreen && NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
+ NDebugger::$blueScreen && !$done && NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
$connection->onEvent[] = array($this, 'logEvent');
} elseif (is_callable('Debugger::enable')) {
Debugger::$bar && Debugger::$bar->addPanel($this);
- Debugger::$blueScreen && Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
+ Debugger::$blueScreen && !$done && Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
$connection->onEvent[] = array($this, 'logEvent');
}
+ $done = TRUE;
}
404 examples/Nette/Debugger.php
View
246 additions, 158 deletions not shown
BIN  examples/data/arrow.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2  examples/nette-debug-and-exceptions.php
View
@@ -15,7 +15,7 @@
// enable Nette Debugger
-ndebug();
+debug();
dibi::connect(array(
2  examples/nette-debug-and-variables.php
View
@@ -1,5 +1,7 @@
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
+<style> html { background: url(data/arrow.png) no-repeat bottom right; height: 100%; } </style>
+
<h1>Nette Debugger & Variables | dibi</h1>
<p>Dibi can dump variables via Nette Debugger, part of Nette Framework.</p>
Please sign in to comment.
Something went wrong with that request. Please try again.