[TYPO3-ect] Debugging with lib/div
Stefan Geith
typo3dev2007 at geithware.de
Mon Aug 6 13:29:28 CEST 2007
Hi libdiv's !
Is there a concept about debugging or a debugObj with lib/div ?
Because it's not only usefull for development but also for the users of
my plugins, I implemented configurable debugmessages to my plugins: e.g.
plugin.tx_myplugin.dodebug.tmpl = 1
enables output of debugmessages for template related actions.
plugin.tx_myplugin.dodebug.getitems = category
enables output of debugmessages for relations on field category.
Is there something available or planned for lib/div ?
I think it would be usefull to have a debugger() in tx_lib_object, like
already controller(), configurations() and parameters()
-and/or-
a _createDebugger() in tx_lib_controller->main()
There could be a debugger Interface and a default class DebuggerVoid()
that doesn't do any output at all, but can be replaced (via TS) by a
real (= more sophisticated) Debugger.
I personally would like to have these functions:
$debugger->debug($var) ... always debug $var
$debugger->debugIfEnabled('xyz',$var)
... only debug if dodebug.xyz is set in TS
$debugger->debugIfFieldIsSet('xyz',$fieldname,$var)
... only debug if content of dodebug.xyz==$fieldname;
This is usefull e.g. to debug db-relations on a specific field
$debugger->shortBacktrace($count=5,$minimize=0)
... that gives a condensed view of debug_backtrace
Additionally:
$debugger->forceDebug($val) ... where $val could come from
the flexform of the plugin:
$val<0 => never do any debug-output
$val=0 => debug-output depending on TS .dodebug...
$val>0 => output every debug-message available
What do You think about this ?
-
Stefan
More information about the TYPO3-team-extension-coordination
mailing list