cotonti.com : Debugging facilities https://www.cotonti.com Останні повідомлення в темі Cotonti en Mon, 16 Feb 2026 17:24:46 -0000 Trustmaster Пн, 04 Травень 2009 01:20:56 -0000 GHengeveld Нд, 03 Травень 2009 23:22:41 -0000 Trustmaster
OK, I've added a few simple functions which make manual debugging easier:
  • sed_assert($var1,..) - use it to print variables on a blank screen immediately
  • sed_backtrace() - prints backtrace (files, functions, parameters). By default blanks the screen, call sed_backtrace(FALSE) to see backtrace within normal output flow.
  • sed_vardump() - attempts to print contents of all global variables recursively. Doesn't print all of them because it has length limitation. By default blanks the screen, call sed_vardump(FALSE) to see vardump within normal output flow.

sed_diefatal() was modified and a new option was added to config.php:
/**
 * Defines whether to display debugging information on critical errors.
 * Comment it on production sites if you wish.
 */
define('SED_DEBUG', TRUE);
By default this switch is on. On some production sites you'd like to disable it because debug info contains file paths. When this switch is defined, sed_diefatal() prints backtrace. It is extremely useful to track MySQL errors.]]>
Ср, 29 Кві 2009 12:25:39 -0000
Kilandor Ср, 29 Кві 2009 06:23:56 -0000 Orkan
Yah, debugging on a production server isnt the best practice :p
Anyway, it could be nice to have XDebug stack trace displayed on each server halt, like Symfony has, with last DB query used. MySQL error messages are the most irritating, they never show which query is causing problems. The most extreme example is something like: Error at ''

PS. XDebug and Target Management for Eclipse (vid)]]>
Ср, 29 Кві 2009 03:01:56 -0000
Trustmaster using XDebug with NetBeans.

I just thought XDebug or ZendDebugger is not always available to everyone, so having simple debugging tools available in CMF could help. OFC, it doesn't allow you real breakpoints (with play/pause, etc.) or watches, but still obviously better than "OOPS, me crashed, read the code again from the very beginning".]]>
Вт, 28 Кві 2009 23:32:00 -0000
Elgan Вт, 28 Кві 2009 23:17:10 -0000 Orkan
Check out the Web Debug Toolbar from Symfony - I found it very useful :)]]>
Вт, 28 Кві 2009 22:11:37 -0000
Trustmaster
I use XDebug for local debugging but you can't use it on a real website.

If you'd like to request some features related to debugging, post them below.]]>
Вт, 28 Кві 2009 16:43:18 -0000