XenDebug (XenForo Debug Tools)

XenDebug (XenForo Debug Tools) 1.0.4

No permission to download

Naatan

Well-known member
Naatan submitted a new resource:

XenDebug (version 0.1) - Addon for developers that provides you with additional debugging functionality

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...

Read more about this resource...
 
I would appreciate if any developers extend upon this addon that they share it back with the community, I made this addon to increase my productivity and am sharing it with you so you can do the same.
 
Thanks! Nice addon!
But want to ask: what exact benefits it has over xdebug for example?

I'm not sure I catch your meaning? Xdebug is an interactive debugger, this addon provides you with a detailed debug log. They're 2 different things.

You could use xdebug to retrieve the same info as this addon provides, but when you're often accessing certain data or when you are actively debugging a large amount of code having a debug log comes in very useful.

It's a tool that I use on top of xdebug, it's not intended to be an alternative to xdebug.
 
I'm getting an error when using this plugin and trying to do a search on phrase:

Code:
Admin Control Panel
Server Error
 
vsprintf() [function.vsprintf]: Too few arguments
 
XenForo_Application::handlePhpError()
vsprintf() in XenDebug/Log/Abstract.php at line 126
XenDebug_Log_Abstract->logQuery() in XenDebug/Db/Mysqli.php at line 10
XenDebug_Db_Mysqli->query() in Zend/Db/Adapter/Abstract.php at line 734
Zend_Db_Adapter_Abstract->fetchAll() in XenForo/Model/Phrase.php at line 64
XenForo_Model_Phrase->getEffectivePhraseListForLanguage() in XenForo/ControllerAdmin/Phrase.php at line 300
XenForo_ControllerAdmin_Phrase->actionSearch() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/sites/plugins.xf.com/htdocs/admin.php at line 13

When I disable this plugin all is well. Specifically disabling mysql logging by passes the issue.

Settings:
(*) Log Exceptions
(*) Log Debug
(*) Log Code Events (Default groups)
(*) Log SQL Queries
 
Naatan updated XenDebug with a new update entry:

v0.1.2

  • Properly call debug method with multiple parameters
  • Ensure XenDebug is initialized before attempting to do anything with the DB drivers
  • Disable XenDebug in webdav mode
  • Fall back on Log/File in case user input class does not exist
  • Fix bug where constant was accessed in the wrong class
  • Don't log to ChromePHP if headers are already sent

Read the rest of this update entry...
 
I'm getting an error when using this plugin and trying to do a search on phrase:

Code:
Admin Control Panel
Server Error
 
vsprintf() [function.vsprintf]: Too few arguments
 
XenForo_Application::handlePhpError()
vsprintf() in XenDebug/Log/Abstract.php at line 126
XenDebug_Log_Abstract->logQuery() in XenDebug/Db/Mysqli.php at line 10
XenDebug_Db_Mysqli->query() in Zend/Db/Adapter/Abstract.php at line 734
Zend_Db_Adapter_Abstract->fetchAll() in XenForo/Model/Phrase.php at line 64
XenForo_Model_Phrase->getEffectivePhraseListForLanguage() in XenForo/ControllerAdmin/Phrase.php at line 300
XenForo_ControllerAdmin_Phrase->actionSearch() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/sites/plugins.xf.com/htdocs/admin.php at line 13

When I disable this plugin all is well. Specifically disabling mysql logging by passes the issue.

Settings:
(*) Log Exceptions
(*) Log Debug
(*) Log Code Events (Default groups)
(*) Log SQL Queries


Only just saw your message, todays update should have fixed this. Funny how I released it half an hour after you posted that without having seen your message.
 
Upgraded and still getting the error:
Code:
vsprintf() [function.vsprintf]: Too few arguments
 
XenForo_Application::handlePhpError()
vsprintf() in XenDebug/Log/Abstract.php at line 126
XenDebug_Log_Abstract->logQuery() in XenDebug/Db/Mysqli.php at line 10
XenDebug_Db_Mysqli->query() in Zend/Db/Adapter/Abstract.php at line 734
Zend_Db_Adapter_Abstract->fetchAll() in XenForo/Model/Phrase.php at line 64
XenForo_Model_Phrase->getEffectivePhraseListForLanguage() in XenForo/ControllerAdmin/Phrase.php at line 300
XenForo_ControllerAdmin_Phrase->actionSearch() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/sites/plugins.xf.com/htdocs/admin.php at line 13

I'll take a look tonight to see if I can fix it. If I do I'll branch/push to github.
 
Only just saw your message, todays update should have fixed this. Funny how I released it half an hour after you posted that without having seen your message.
Great minds think alike. I should be adding to your mod as well.
 
Looking at the code I see I've wrote down "exception" instead of "Exception" in a catch block, I'm guessing that's the reason it's not falling back on the catch block, though I'm not in a position to test right now. I'll look into it tomorrow.
 
Hi @Naatan,

first, great addon:) The ChromeDebug is working excellent, but is do not find the xendebug.log when i switch to XenDebug_Log_File. Where is it generated and written to?
 
Really nice add-on! Seems to have no problems with the 1.4 releases. But I found a small bug in the default value of the second parameter in the log() method in XenDebug_Log_File and XenDebug_Log_ChromePhp class

PHP:
public function log($message, $type = self::TYPE_DEBUG, $level = 3)
should be

PHP:
public function log($message, $type = XenDebug_Log::TYPE_DEBUG, $level = 3)
 
Nice addon but I don't know how to use it correctly.
I want to check what is happening on my portal and why it takes over 10seconds to load.
The original debug only showed the queries which were around 0.001s and so it has to be something different.
Well after installing, enabling debug and loading the website, I can't find the XenDebug.log file. It isn't in the upload_tmp_dir. :unsure:
Another thing is that I don't get anything by the ?_debug=1 param anymore.:eek:

Can anybody help me out?
 
Top Bottom