TYPO3 V 3.6
You don't have to do anything special. Just install the extension and it should work.
TYPO3 V 3.5
You have to patch TYPO3. I hope the description below is still valid.
CCDebug provide a function debug() as a replacement for TYPO3's debug() function. Because it's not possible to redeclare the function you have to patch the file t3lib/config_default.php.
Search for function debug and name it function xdebug. Then paste this code in:
function debug($variable, $name='*variable*', $line='*line*', $file='*file*', $recursiveDepth=3, $debugLevel=E_DEBUG){// If you wish to use the debug()-function, and it does not output something,
// please edit the IP mask in TYPO3_CONF_VARS
if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv("REMOTE_ADDR"), $GLOBALS["TYPO3_CONF_VARS"]["SYS"]["devIPmask"])) return;if(@is_callable(array($GLOBALS['error'],'debug'))) {$GLOBALS['error']->debug($variable, $name, $line, $file, $level);
} else {$name = ($name == '*variable*') ? 0 : $name;
t3lib_div::debug($variable, $name);
}
}
If you use the frontend gzip option you have to patch tslib/index_ts.php also:
// *************
// Debugging
// *************
if(@is_callable(array($error,'debugOutput'))) {$error->debugOutput();
}
// *************
// Compressions
// *************
if ($TYPO3_CONF_VARS['FE']['compressionLevel']){
With CCDebug put you have some additional parameters to the debug() function:
function debug($variable, $name = '*variable*', $line = '*line*', $file = '*file*', $level = E_DEBUG)
As you see you can pass
a name or description
the line number; this is normally done with the special PHP constant __LINE__
the script file name; normally passed with __FILE__
debug level; the PHP's predefined and some additional debug levels can be used
Unfortunately it's not possible to get the line number and file name automatically so you have to provide it in every debug() call with the PHP constants __LINE__ and __FILE__. You may create a macro in your editor.
These calls works all but gives less information in the debug window:
debug(time(), 'current time', __LINE__, __FILE__);
debug(time(), 'current time', __LINE__);
debug(time(), 'current time');
debug(time());
TODO
Configuration options