XenDebug (XenForo Debug Tools)

XenDebug (XenForo Debug Tools) 1.0.4

No permission to download
Compatible XF 1.x versions
  1. 1.0
  2. 1.1
  3. 1.2
Visible branding
No
This add-on is not affiliated with XenForo Ltd.


Description

XenForo addon for developers that provides you with additional debugging functionality.
Currently just adds logging functionality for Code events, SQL Queries, Exceptions, HTTP requests, Debug messages and custom logging calls.
The logging class itself is extendable so you can easily create a custom logging class that logs to a different tool (eg. syslog, firebug, another database, etc.).

Installation
Install like any other addon. If you wish to use SQL Query Logging check the section below.
Note that this addon does nothing if you do not have debugMode turned on!

SQL Query Logging
If you want to use the SQL logging functionality you need to add the following to the bottom of your config.php:

PHP:
if (file_exists(dirname(__FILE__) . '/XenDebug/Db/Mysqli.php'))
{
    $config['db']['adapterNamespace'] = 'XenDebug';
    $config['db']['adapter'] = 'Db_Mysqli';
}

NOTE
Replace Mysqli in the above code snippet with whatever adapter you wish to use.
Currently supported adapters:
  • Mysqli
  • Db2
  • Oracle
  • Sqlserv
Configuration
Configuration options are available under Options > XenDebug.
Note that the Log level for all build in log messages is 3, except for errors and exceptions, which uses log level 1.
The log level is mostly meant for custom log messages not made by this addon itself.
You'll want to pay special attention to the Logging Class setting.

Usage

To log your own messages simply use the following PHP method call
PHP:
XenDebug_Log::getInstance()->log(MESSAGE, TYPE, LEVEL);
  • MESSAGE - The message you wish to log (if this isn't a string it will be JSON encoded).
  • TYPE - The type of message you wish to log, you can use one of the predefined constants listed below or use your own.
  • LEVEL - the log level of this message.
Message Types
  • XenDebug_Log::TYPE_DEBUG
  • XenDebug_Log::TYPE_WARNING
  • XenDebug_Log::TYPE_ERROR
  • XenDebug_Log::TYPE_EXCEPTION
  • XenDebug_Log::TYPE_INFO
  • Screen shot 2012-02-28 at 1.12.28 PM.webp
    Screen shot 2012-02-28 at 1.12.28 PM.webp
    35.7 KB · Views: 847
  • Screen shot 2012-02-28 at 1.12.07 PM.webp
    Screen shot 2012-02-28 at 1.12.07 PM.webp
    43.5 KB · Views: 866
  • Screen shot 2012-02-28 at 1.15.09 PM.webp
    Screen shot 2012-02-28 at 1.15.09 PM.webp
    69.2 KB · Views: 841
Author
Chris D
Downloads
162
Views
1,740
First release
Last update

Ratings

5.00 star(s) 5 ratings

More resources from Chris D

Latest updates

  1. Stability fixes

    Fixed error class causing crash when the XF error class was already initialized Fixed constant...
  2. Catch SQL param mismatch errors

    Catch SQL param mismatch errors
  3. v0.1.2

    Properly call debug method with multiple parameters Ensure XenDebug is initialized before...

Latest reviews

Very useful resource, a must have for developers. The SQL query log alone saved me a lot of time. I like the extensibility of it as well, being able to add your own logging classes is a nice feature.
Absolutely invaluable as a developer tool and beautifully coded (as can always be expected from Naatan).
awesome!!!
Excellent tool for logging errors within xF
Excellent tool for logging events within xF
Really good work! Thanks for that.
Back
Top Bottom