[TYPO3-mvc] debug repository object with debug()

Steffen Müller typo3 at t3node.com
Wed Apr 27 10:55:02 CEST 2011


Hi.

On 27.04.2011 09:45 Oliver Wand wrote:
>>
>> Are there other strategies to explore these objects? debug Fluid Helper
>> maybe?
>>

Yesterday, I have tested the mentioned solution in
http://forge.typo3.org/issues/7784

There are some glitches:
- The patch does not fully fit the master repo (ext_autoconf.php)
- Afaik invalid HTML (<link> tag inside <body> instead of <head>)
- Styling issues
- Directly writes HTML to stdout instead of returning it. So you cannot 
pipe it to t3lib_div::devLog() atm.

I seems it it only debugs models. I tested objects from other classes 
without success. If this is not supported, the names are misleading:
Tx_Extbase::var_dump()
Tx_Extbase_Error_Debugger::var_dump()

Either it should work on any object, or change names to something similar to
Tx_Extbase::model_dump()
Tx_Extbase_Error_Debugger::model_dump()


I have ported the patch to a separate extension to fill the gap between 
now and a final extbase solution:
http://www.t3node.com/fileadmin/user_upload/ext/T3X_ext_debug.t3x

Usage in controller:
Tx_ExtDebug::var_dump($yourModel);
die();


-- 
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Twitter: http://twitter.com/t3node


More information about the TYPO3-project-typo3v4mvc mailing list