Welcome Guest, Not a member yet? Register   Sign In
Getting encrypted name problem.
#3

Here is the code to a better var_debug.

Just place it in a helper and run  it.

PHP Code:
if ( ! function_exists('varDebug'))
{
    
/**
     * Debug Helper
     * ----------------------------------------------------------------------------
     * Outputs the given variable(s) with color formatting and location
     *
     * @param    mixed    - variables to be output
     */
    
function varDebug()
    {
        list(
$callee) = debug_backtrace();

        
$arguments func_get_args();

        
$total_arguments func_num_args();

        echo 
'<div><fieldset style="background: #fefefe !important; border:1px red solid; padding:15px">';
        echo 
'<legend style="background:lightgrey; padding:5px;">'.$callee['file'].' @line: '.$callee['line'].'</legend><pre><code>';

        
$i 0;
        foreach (
$arguments as $argument)
        {
            echo 
'<strong>Debug #'.++$i.' of '.$total_arguments.'</strong>: '.'<br>';
            
var_dump($argument);
        }

        echo 
"</code></pre></fieldset><div><br>";
        exit;
    }


Hope that helps
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Getting encrypted name problem. - by HarrysR - 08-16-2018, 08:12 AM
RE: Getting encrypted name problem. - by jreklund - 08-17-2018, 02:10 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 06:20 AM
RE: Getting encrypted name problem. - by InsiteFX - 08-17-2018, 03:49 AM
RE: Getting encrypted name problem. - by jreklund - 08-17-2018, 07:11 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 08:20 AM
RE: Getting encrypted name problem. - by InsiteFX - 08-17-2018, 10:21 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 11:11 AM
RE: Getting encrypted name problem. - by jreklund - 08-17-2018, 11:02 AM
RE: Getting encrypted name problem. - by HarrysR - 08-17-2018, 11:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB