Index: trunk/kernel/include/debugger.php
===================================================================
diff -u -r2347 -r2567
--- trunk/kernel/include/debugger.php (.../debugger.php) (revision 2347)
+++ trunk/kernel/include/debugger.php (.../debugger.php) (revision 2567)
@@ -31,8 +31,8 @@
'DBG_USE_HIGHLIGHT'=>1,
'DBG_USE_SHUTDOWN_FUNC'=>DBG_ZEND_PRESENT?0:1,
'DBG_HANDLE_ERRORS'=>DBG_ZEND_PRESENT?0:1,
- 'DBG_SHOW_MEMORY_USAGE'=>1,
'DBG_IGNORE_STRICT_ERRORS'=>1,
+ 'DBG_DOMVIEWER'=>'/temp/domviewer.html',
'DOC_ROOT'=> str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT']) ), // windows hack
'DBG_LOCAL_BASE_PATH'=>'w:');
@@ -367,6 +367,9 @@
{
$script = $_SERVER['SCRIPT_FILENAME'];
$this->appendHTML('ScriptName: '.$this->getFileLink($script,1,basename($script)).' ('.dirname($script).')');
+
+ $this->appendHTML('DomViewer: ');
+
ob_start();
?>
@@ -488,6 +491,7 @@
$this->profileFinish('script_runtime');
if( dbg_ConstOn('DBG_ZEND_PRESENT') ) return;
+
dbg_safeDefine('DBG_RAISE_ON_WARNINGS',0);
dbg_safeDefine('DBG_WINDOW_WIDTH', 700);
@@ -623,6 +627,15 @@
memoryUsage['debugger_finish']=memory_get_usage();
- $this->memoryUsage['print_report']=$this->memoryUsage['debugger_finish']-$this->memoryUsage['debugger_start'];
- $this->memoryUsage['total']=$this->memoryUsage['print_report']+$this->memoryUsage['error_handling'];
- $this->memoryUsage['application']=memory_get_usage()-$this->memoryUsage['total'];
- if($returnResult)
- {
- $ret = ob_get_contents();
- ob_clean();
- if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) $ret.=$this->getMemoryUsageReport();
- return $ret;
- }
- else
- {
- ob_end_flush();
- if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) echo $this->getMemoryUsageReport();
- }
+
+ dbg_safeDefine('DBG_SHOW_MEMORY_USAGE', 1);
+ if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') )
+ {
+ $this->memoryUsage['debugger_finish']=memory_get_usage();
+ $this->memoryUsage['print_report']=$this->memoryUsage['debugger_finish']-$this->memoryUsage['debugger_start'];
+ $this->memoryUsage['total']=$this->memoryUsage['print_report']+$this->memoryUsage['error_handling'];
+ $this->memoryUsage['application']=memory_get_usage()-$this->memoryUsage['total'];
+ }
+
+ if($returnResult)
+ {
+ $ret = ob_get_contents();
+ ob_clean();
+ if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) $ret .= $this->getMemoryUsageReport();
+ return $ret;
+ }
+ else
+ {
+ ob_end_flush();
+ if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) echo $this->getMemoryUsageReport();
+ }
}
/**
@@ -796,7 +828,9 @@
*/
function getMemoryUsageReport()
{
- $info=Array('printReport'=>'print_report',
+ if( !dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) return '';
+
+ $info = Array('printReport'=>'print_report',
'saveError'=>'error_handling',
'Total'=>'total',
'Application'=>'application');
@@ -845,10 +879,10 @@
/*in /www/kostja/in-commerce4/kernel/kernel4/parser/construct_tags.php(177) : runtime-created function on line
[PRE-PARSED block, $line 13]: Undefined variable: IdField*/
-
+ /*
if( strpos($errfile,'runtime-created') !== false ) {
$errfile = ' PRE-PARSED block '.$this->CurrentPreParsedBlock.' ';
- }
+ }*/
if( strpos($errfile,'eval()\'d code') !== false )
{