XenForo Enable Debug Mode for Specific IP Addresses

Turn on debug mode only for specific users.

  1. Shriker
    Debug mode gives more access to error messages, debugging/performance information, and development tools. It should not be run on a production forum as it may degrade performance or even open up security issues. However, you can limit it so that debug mode only runs for a few specific users (usually those who are charged with maintaining your forum/server).

    Substitute with the desired IP addresses that you wish to enable debug mode for.


    ['db']['host'] = 'hostname';
    $config['db']['port'] = '3306';
    $config['db']['username'] = 'username';
    $config['db']['password'] = 'password';
    $config['db']['dbname'] = 'database';

    // Enable debug mode for these IP addresses
    $allowedIPs = array(
    ''// First allowed IP address
    ''// Second allowed IP address

    if (
    in_array($_SERVER['REMOTE_ADDR'], $allowedIPs)) {
    $config['debug'] = true;
    Now you can safely leave debug mode enabled, as only the allowed users will be able to access it.