TYPO3 CMS  TYPO3_7-6
GlobalDebugFunctions.php
Go to the documentation of this file.
1 <?php
2  // Simple debug function which prints output immediately
3  function xdebug($var = '', $debugTitle = 'xdebug')
4  {
5  // If you wish to use the debug()-function, and it does not output something,
6  // please edit the IP mask in TYPO3_CONF_VARS
7  if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
8  return;
9  }
11  }
12 
13  // Debug function which calls $GLOBALS['error'] error handler if available
14  function debug($variable = '', $name = '*variable*', $line = '*line*', $file = '*file*', $recursiveDepth = 3, $debugLevel = 'E_DEBUG')
15  {
16  // If you wish to use the debug()-function, and it does not output something,
17  // please edit the IP mask in TYPO3_CONF_VARS
18  if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
19  return;
20  }
21  if (is_object($GLOBALS['error']) && @is_callable([$GLOBALS['error'], 'debug'])) {
22  $GLOBALS['error']->debug($variable, $name, $line, $file, $recursiveDepth, $debugLevel);
23  } else {
24  $title = $name === '*variable*' ? '' : $name;
25  $group = $line === '*line*' ? null : $line;
26  \TYPO3\CMS\Core\Utility\DebugUtility::debug($variable, $title, $group);
27  }
28  }
29 
30  function debugBegin()
31  {
32  if (is_object($GLOBALS['error']) && @is_callable([$GLOBALS['error'], 'debugBegin'])) {
33  $GLOBALS['error']->debugBegin();
34  }
35  }
36 
37  function debugEnd()
38  {
39  if (is_object($GLOBALS['error']) && @is_callable([$GLOBALS['error'], 'debugEnd'])) {
40  $GLOBALS['error']->debugEnd();
41  }
42  }
static debug($var='', $header='', $group='Debug')
debug($variable='', $name=' *variable *', $line=' *line *', $file=' *file *', $recursiveDepth=3, $debugLevel='E_DEBUG')
xdebug($var='', $debugTitle='xdebug')
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']