[TYPO3-dev] domesticating t3lib_div::debug

Steffen Kamper steffen at sk-typo3.de
Fri May 2 18:33:47 CEST 2008


"Dmitry Dulepov [typo3]" <dmitry at typo3.org> schrieb im Newsbeitrag 
news:mailman.1.1209730195.3489.typo3-dev at lists.netfielders.de...
> Steffen Kamper wrote:
>> what is not compatible? I don't see an issue
>>
>> using $GLOBALS['forceDebug'] is same behaviour like before,
>> without only the debug info is placed different.
>
> No, it is not the same.
>
> I see two issues here.
>
> Let's say I have sqlDebug enabled (just in case). It produces SQL error 
> reports if errors happen. My BE module does not have any templates and 
> does not know about ###DEBUG###. So I do not see any output and miss any 
> random SQL errors. I miss all my debug() calls as well.
any
>

no, any module in BE uses a template, that was one reason to put docheaders 
everywhere

> Ok, I remember that I cannot see debug() calls immediately since 4.2.1 and 
> turn on forceDebug. But my module dies in the middle and all debug output 
> is lost.
>

in this (special) case when a modul crashes before output you can switch to 
forceDebug to see your debug. I call it special case because normally you 
see at least the module but wrong output. In most cases you use debug to 
print content of vars.

You can switch also direct in your code to get the output, eg:
$GLOBALS['forceDebug'] = 1;
t3lib_div::debug($myVar);
die();

so it doesn't take your freedom.

vg Steffen







More information about the TYPO3-dev mailing list