XF 2.0 enable debug mode for super admin

You can do it per user group as that is not fetched in the config file.

So you need to do this based in IP's. Add the following to your src/config.php

Code:
// Add your IP here
$debug_ips = array('xxx.xx.x.xxx');

//For multiple IPs use this format above
//$debug_ips = array('xxx.xx.x.xxx','yyy.yy.y.yyy');

// Fetching IP's
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
    $ip_address = $_SERVER['REMOTE_ADDR'];
}

// Enable debug if IP matches
if(in_array($ip_address, $debug_ips))
    $config['debug'] = true;
 
@Ozzy47 Could you please try whether this works with XF 2.2?
I tried on my localhost server on my mac mini and it doesn't work well even if I whitelisted 127.0.0.1 in config.php file.
 
Back
Top Bottom