- Optional recursion limiting
- Basic protection against accidental use in production environments
- Supports CLI and web applications
- Formatted, colorized output
To get started, include the library in your project. The first file that is loaded is usually a good choice.
include('Dbug.php');
Now you're ready to debug a variable
D::bug($yourVariable);
Debug a variable without recursion protection
D::bug($yourVariable, true, -1);
Check a string for control characters
D::bugString($yourString);
Generate a backtrace
D::backtrace();
List included files
D::includes();
View ini settings
D::ini();
Grant or revoke debugging privileges (This will override all other checks. Use with caution!)
if($clientIsEligibleForDebugging)
D::authorize();
else
D::deauthorize();