File/debugger.php

Description
Classes
Class Description
 class webdebugger The debugger class. Responsible for accumulating, filtering and then
Constants
DBG_ALL = 511 (line 56)

Everything. Warning, this can be VERBOSE!

DBG_AUTH = 256 (line 52)

Show site authentication output

DBG_DEBUG = 1 (line 36)

Ad-hoc debugging output

DBG_DEFAULT = 3 (line 54)

DEBUG and DIAGNOSTICS as default setting

DBG_DIAGNOSTIC = 2 (line 38)

Diagnostic output

DBG_DUMP = 16 (line 44)

Dump HTTP and PHP page vars

DBG_NONE = (line 34)

No debugging (redundant)

DBG_O_ALL = 255 (line 74)

Ubiquitous output mode

DBG_O_CLI = 4 (line 66)

Output for CLI: echoed raw ASCII, LF end-of-line

DBG_O_DEFAULT = 1 (line 72)

Default output mode (stored)

DBG_O_ECHO = 2 (line 64)

Output via direct echo

DBG_O_LOG = 8 (line 68)

Output to system log

DBG_O_LOGFILE = 16 (line 70)

To logfile (not implemented yet)

DBG_O_NONE = (line 60)

No output

DBG_O_STORED = 1 (line 62)

Output stored in $content

DBG_PROFILE = 128 (line 50)

Show debugging profiler output

DBG_SQL = 4 (line 40)

SQL queries to database

DBG_SQLDATA = 8 (line 42)

SQL SELECT data from database

DBG_TABLES = 64 (line 48)

Show table borders and validation checks

DBG_TRACE = 32 (line 46)

Provide debug traceback info

DBG_UNDEFINED = -1 (line 32)

Dummy value

Functions
debug (line 611)

Add content to debug content Adds the string content to the debugger output. This is done in raw fashion without any
or linefeed chars appended.

The output will then appear as per the output settings.

void debug (string $content, [integer $debugclass = DBG_DIAGNOSTIC])
  • string $content: Content to add to debug output buffer
  • integer $debugclass: Class of output
debugbr (line 626)

Add content to debug content with
Adds the string content to the debugger output and appends
to it. This is intended for output to HTML pages.

void debugbr (string $content, [integer $debugclass = DBG_DIAGNOSTIC])
  • string $content: Content to add to debug output buffer
  • integer $debugclass: Class of output
debugging (line 736)

Return debugger status Function for external routines to determine whether debugging is enabled or not..

  • return: True if debugging is enabled
boolean debugging ()
debug_class (line 669)

Set debugging class(es) Sets the class or classes (OR'ed together) of debug output which will be accepted/rendered on ouput.

void debug_class ([integer $debugclass = ""])
  • integer $debugclass: Class of output
debug_dump (line 708)

Sets flag for debugger to include global vars in output.

void debug_dump ()
debug_hex (line 644)

Add string to debug content as hexdump

Add string content to output as a hexdump. This is for string data only. use this when you want to see 'inside' a string variable and view the characters as hexadecimal highlighted according to hex range. Chars are highlighted as follows: ASCII value = 32 (Spaces) ......... Blue ASCII values < 32 (Control chars) .. Red ASCII values > 127 ................. Green

void debug_hex (string $str, [string $msg = ""], [integer $debugclass = DBG_DIAGNOSTIC])
  • string $str: String to view as hex
  • string $msg: Message to title the dump with
  • integer $debugclass: Class of output
debug_off (line 697)

Set debugging off

void debug_off ()
debug_on (line 687)

Set debugging on Sets the debugging on. Sets class(es) to accept.

void debug_on ([integer $debugclass = DBG_DEFAULT])
  • integer $debugclass: Class of output
debug_output (line 749)

Set debugger output mode This function allows setting of the debugger output mode which determines where output goes.

void debug_output ([integer $mode = DBG_O_DEFAULT])
  • integer $mode: The debugger output mode
debug_phpinfo (line 759)

Calls Php phpinfo() function

void debug_phpinfo ()
debug_profile (line 789)

Insert an entry into the profiler. This label will have a line in the profile output against the time elapsed since the last line.

void debug_profile (mixed $label)
debug_profiling (line 797)

Returns true if the RESPONSE is in profiling mode

void debug_profiling ()
debug_render (line 722)

Render the debug output as a string.

Normally debug output is taken care of by the system, however you might need to get hold of the output for some reason, and this is the function to do it.

  • return: Debugger content as a string
string debug_render ()
debug_trace (line 820)

DEBUG TRACEBACK Usage: In your function you bracket the statements you want to label for tracing as in the following example..

function thing() { debug_trace("mymodule"); // pushes "mymodule" on trace stack ...blah blah // program statements debug_trace(); // pops current trace off trace stack } NOTE: You can also use the object identifier for a class instead of a simple string like "mymodule". For example: function thing() { debug_trace($this); // pushes name of object class on trace stack ...blah blah // program statements debug_trace(); // pops current trace off trace stack }

void debug_trace ([mixed $traceobj = ""])
  • mixed $traceobj: Optional object trace is called in
displayvar (line 770)

Display a variable nicely Variables might be other than simple scalars. This function is used internally by the debugger to make sure we show them off in their best light.

void displayvar (mixed $var)
  • mixed $var: The variable to show off

Documentation generated by phpDocumentor 1.3.0RC3