Restrict debug output
For administrators and developers. Debug output shows SQL, file paths and template names: never for visitors of a public site (Debug output in production).
Contents
Check it is off
./console exp:ini get site.ini/DebugSettings/DebugOutput --allow-root-user # disabled
./console exp:ini get site.ini/TemplateSettings/Debug --allow-root-user # disabled
./console exp:ini where site.ini/DebugSettings/DebugOutput --allow-root-user # which files set itAlso check PHP: display_errors=Off and expose_php=Off for PHP-FPM.
Debug for your address only
In
settings/override/site.ini.append.php:[DebugSettings] DebugOutput=enabled DebugByIP=enabled DebugIPList[] DebugIPList[]=203.0.113.10Behind a proxy,
DebugByIPuses the visitor address only from trusted proxies; never list the proxy's own address.Clear the INI cache and reload PHP.
Reproduce the problem; consider finding the error by its reference in the log viewer instead (Finding an error by its reference).
Remove it again
Set DebugOutput=disabled (or remove the lines), clear the INI cache, reload. Then from another network:
curl -s https://www.example.gov/ | grep -c -i 'debug'The audit records each setting write; /audit/console/(name)/system.setting.write shows forgotten debug switches.
Related pages
- Debug output in production
- The Exp Debug bar
- 13.4 Debug output and error display
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.