From 442a180f1e60ea54fc23c0b308407b4e0b2fedb2 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 17 Nov 2012 02:09:48 +0100 Subject: [PATCH] Implement a step-by-step debugger --- base.php | 1 + include.debug.php | 388 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 389 insertions(+) create mode 100644 include.debug.php diff --git a/base.php b/base.php index 5b86712..8727538 100644 --- a/base.php +++ b/base.php @@ -14,6 +14,7 @@ require("include.constants.php"); require("include.config.php"); +require("include.debug.php"); require("include.dependencies.php"); require("include.exceptions.php"); diff --git a/include.debug.php b/include.debug.php new file mode 100644 index 0000000..285da59 --- /dev/null +++ b/include.debug.php @@ -0,0 +1,388 @@ + $timestamp, + 'data' => $data + ); + } +} + +function cphp_debug_dump() +{ + global $cphp_debug_log; + + return json_encode($cphp_debug_log); +} + +function cphp_debug_display($data) +{ + /* We can't use the templater for this, because that would make this function unusable if the + * templater itself were to ever be the subject of the debugging. */ + ?> + + + + CPHP Debuglog Viewer + + + + + +
+
+
+
+
+ +
+
+
+ +
+ + +