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".'