$file = MagentoDebugger::getDebuggerVarDir() . '/ajax-console.log';
        file_put_contents($file, $_POST['message'] . "\n", FILE_APPEND);
        return;
    }
    if ($_GET['magento_debug'] == 'model' && isset($_GET['magento_debug_model_method'])) {
        $modelMethodName = $_GET['magento_debug_model_method'];
        header('Content-Type: text/plain');
        require_once MagentoDebugger::getDebuggerDir() . '/libs/Debugger/model.php';
    }
    if ($_GET['magento_debug'] == 'maillist' && isset($_GET['magento_debug_action'])) {
        require_once MagentoDebugger::getDebuggerDir() . '/libs/Debugger/mails.php';
    }
    if ($_GET['magento_debug'] == 'profiler' && isset($_GET['magento_debug_action'])) {
        require_once MagentoDebugger::getDebuggerDir() . '/libs/Debugger/profiler.php';
    }
    if ($_GET['magento_debug'] == 'mysql' && isset($_GET['magento_debug_action'])) {
        require_once MagentoDebugger::getDebuggerDir() . '/libs/Debugger/mysql.php';
    }
    return;
}
// Profiler
if (isset($_COOKIE['magento_debug_profiler']) && $_COOKIE['magento_debug_profiler'] == 'yes') {
    MagentoDebugger::enableProfiler();
}
//$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
//ini_set('display_errors', 1);
chdir(MagentoDebugger::getProjectDir());
require_once 'index.php';
MagentoDebugger::saveConfiguration();
MagentoDebugger::saveProfiler();