cotonti.com : Debugging facilities https://www.cotonti.com Последние сообщения в теме Cotonti en Fri, 17 Apr 2026 14:09:00 -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