Index: trunk/core/kernel/utility/debugger.php =================================================================== diff -u -N -r7635 -r7855 --- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 7635) +++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 7855) @@ -248,10 +248,18 @@ */ function dumpVars() { + $dump_mode = 'var_dump'; $dumpVars = func_get_args(); + + if ($dumpVars[count($dumpVars) - 1] === 'STRICT') { + $dump_mode = 'strict_var_dump'; + array_pop($dumpVars); + } + foreach ($dumpVars as $varValue) { - $this->Data[] = Array('value' => $varValue, 'debug_type' => 'var_dump'); + $this->Data[] = Array('value' => $varValue, 'debug_type' => $dump_mode); } + } function prepareHTML($dataIndex) @@ -273,6 +281,10 @@ return $this->highlightString( $this->print_r($Data['value'], true) ); break; + case 'strict_var_dump': + return $this->highlightString( var_export($Data['value'], true) ); + break; + case 'trace': ini_set('memory_limit', '500M'); $trace =& $Data['trace']; @@ -834,7 +846,7 @@ } return 0; } - + /** * Generates report * @@ -884,13 +896,13 @@ $this->appendHTML('Memory used by Objects: '.round($this->ProfilerTotals['objects'] / 1024, 2).'Kb'); } - /*if ($this->constOn('DBG_INCLUDED_FILES')) { + if ($this->constOn('DBG_INCLUDED_FILES')) { $files = get_included_files(); $this->appendHTML('Included files:'); foreach ($files as $file) { $this->appendHTML($this->getFileLink($this->getLocalFile($file)).' ('.round(filesize($file) / 1024, 2).'Kb)'); } - }*/ + } /*if ($this->constOn('DBG_PROFILE_INCLUDES')) { $this->appendHTML('Included files statistics:'.( $this->constOn('DBG_SORT_INCLUDES_MEM') ? ' (sorted by memory usage)':'')); @@ -959,7 +971,7 @@ $Debugger.DOMViewerURL = ''; $Debugger.EditorPath = ''; $Debugger.DebugURL = 'baseURL.'/debugger_responce.php?sid='.$this->rowSeparator.'&path='.urlencode($dbg_path); ?>'; - + IsFatalError || DBG_RAISE_ON_WARNINGS) { echo '$Debugger.Toggle();'; @@ -1010,12 +1022,21 @@ */ function getShortReport($memory_used) { + if ($this->constOn('DBG_TOOLBAR_BUTTONS')) { + // we have sql & error count in toolbar, don't duplicate here $info = Array( + 'Script Runtime' => 'PROFILE:script_runtime', + ); + } + else { + // toolbar not visible, then show sql & error count too + $info = Array ( 'Script Runtime' => 'PROFILE:script_runtime', '-' => 'SEP:-', 'Notice / Warning' => 'PROFILE_TC:error_handling', 'SQLs Count' => 'PROFILE_TC:sql', ); + } $ret = 'Application:'.$this->formatSize($memory_used).' ('.$memory_used.')'; foreach ($info as $title => $value_key) {