diff --git a/cake/basics.php b/cake/basics.php index 88ea14bdb..c553a294d 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -94,16 +94,29 @@ if (Configure::read('debug') > 0) { if ($showFrom) { $calledFrom = debug_backtrace(); - echo '' . substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1) . ''; - echo ' (line ' . $calledFrom[0]['line'] . ')'; + if(defined('CAKEPHP_SHELL')){ + echo "##########DEBUG##########\n"; + echo substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1) ; + echo ' (line ' . $calledFrom[0]['line'] . ')'."\n"; + }else{ + echo '' . substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1) . ''; + echo ' (line ' . $calledFrom[0]['line'] . ')'; + } + } + if(!defined('CAKEPHP_SHELL')){ + echo "\n
\n"; } - echo "\n\n"; $var = print_r($var, true); if ($showHtml) { $var = str_replace('<', '<', str_replace('>', '>', $var)); } - echo $var . "\n\n"; + echo $var . "\n"; + if(!defined('CAKEPHP_SHELL')){ + echo "\n"; + }else{ + echo "#########################\n"; + }; } } if (!function_exists('sortByKey')) {