# Debug console

$this->console->method()

# Introduction

Light's PHP debug console is a tool designed for debugging information and to solve errors and exceptions easily.

This tool is divided in two tabs, one displays all the debug info produced after the main execution (collecting warnings, exceptions, database queries and custom messages!)
The other tab, displays all the server info available (PHP version, php.ini file location, server timezone, created variables...)

# Console tabs

foo

# Debug tab

Sample controller

    public function someFunction()
    {
        $this->console->addDebugInfo("welcome page loaded ;)");

        $cont = 5;
        $cont = $cont / 0; // Exception

        $list = array(1, "my_value", "hi there! ");
        $this->console->addDebugInfo($list);

        Database::query("SELECT * FROM user");

        Output::load("info/welcomeView");
    }
foo

# Server info tab

Here we see all the server's info possible, we can check the PHP version, the path of php.ini file, and we have a scrollbar which display much more useful info!
foo

# Enabling debug console

For enabling this feature, we need to modify config.php file and set 'debug_console' to 'true' then the debug console will became available.

// Debug
Config::set("debug_console", true); // Set `true` for enabling debug console
Config::set("send_email_errors", false); 
Config::set("whoops", false);
Config::set("execution_time", microtime(true));