diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 50a083fb636..d90b08d5d72 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1603,6 +1603,13 @@ function dol_print_error($db='',$error='') $syslog.=", msg=".$msg; } } + if ($_SERVER['DOCUMENT_ROOT'] && function_exists('xdebug_call_file')) + { + print 'XDebug informations:'."
\n"; + print 'File: '.xdebug_call_file()."
\n"; + print 'Line: '.xdebug_call_line()."
\n"; + print "
\n"; + } dol_syslog("Error ".$syslog, LOG_ERR); } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ebf950d7dd7..f19bb371466 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -36,6 +36,9 @@ if (! empty($_SERVER['DOL_TUNING'])) { list($usec, $sec) = explode(" ", microtime()); $micro_start_time=((float)$usec + (float)$sec); + // Add Xdebug coverage of code + //define('XDEBUGCOVERAGE',1); + if (defined('XDEBUGCOVERAGE')) { xdebug_start_code_coverage(); } } @@ -1015,13 +1018,22 @@ function llxFooter($foot='',$limitIEbug=1) print "\n".''."\n"; + + // Add Xdebug coverage of code + if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); } } if ($conf->use_javascript_ajax) @@ -1030,7 +1042,7 @@ function llxFooter($foot='',$limitIEbug=1) } // Juste pour eviter bug IE qui reorganise mal div precedents si celui-ci absent - if ($limitIEbug && empty($conf->browser->firefox)) print "\n".'
 
'."\n"; + //if ($limitIEbug && empty($conf->browser->firefox)) print "\n".'
 
'."\n"; // If there is some logs in buffer to show if (sizeof($conf->logbuffer)) @@ -1049,9 +1061,6 @@ function llxFooter($foot='',$limitIEbug=1) print "\n"; if ($foot) print ''."\n"; - // Add Xdebug coverage of code - if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); } - print "\n"; print "\n"; } diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 59468f834cb..85f98e5921d 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -33,15 +33,6 @@ define('DOL_VERSION','2.6-beta'); // Also defined in htdocs/install/inc.php define('EURO',chr(128)); -// Add Xdebug coverage of code -//define('XDEBUGCOVERAGE',1); -if (defined('XDEBUGCOVERAGE')) { xdebug_start_code_coverage(); } - -// La fonction clearstatcache ne doit pas etre appelée de manière globale car ralenti. -// Elle doit etre appelée uniquement par les pages qui ont besoin d'un cache fichier vidé -// comme par exemple document.php -//clearstatcache(); - // Definition des constantes syslog if (function_exists("define_syslog_variables")) {