Self-hosted ActiveCollab by default runs an in-production model, but the application also supports debug mode. This mode is useful when you are troubleshooting the system.
Once in debug mode, the following resources become available:
- Execution details are logged in /logs directory. Use them to find notices, warnings, and errors, or to see if the system executes correctly,
- When ActiveCollab returns an error (like 500) due to an exception, the response will include exception details that you can use for further debugging.
Enable Debug Mode
To enable debug mode, open config/config.php file, and look for a line that declares APPLICATION_MODE. If that declaration exists, make sure that its value is set to debug.
If APPLICATION_MODE declaration does not exist, add these three lines, at the beginning of the configuration file (after <?php openning tag):
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- const APPLICATION_MODE = 'debug';
Note
Make sure that APPLICATION_MODE is declared only once. Having it appear twice may break the system because constants can be declared only once.
Disabling Debug Mode
The system should not run in debug mode. It is designed for troubleshooting and should be disabled as soon as troubleshooting is over. Debug mode can cause several issues when used in production:
- Slow things down because a lot more info is captured and logged during execution,
- Use a lot of disk space with log files (several gigabytes each day for busy servers),
- Expose paths and other internal execution data in error responses to the browser. That info is important for debugging, but should never be exposed in production.
In order to disable debug mode, open config/config.php file, find and remove lines that:
- Declare APPLICATION_MODE option,
- Override display errors settings using ini_set('display_errors', 1); call,
- Override error reporting settings, using error_reporting() function call.