Debug Mode
Debug Mode is a powerful troubleshooting tool in CloudOnex Business Suite that helps identify and resolve issues by providing detailed error information. This guide explains how to use Debug Mode effectively and safely.
Enabling Debug Mode
Basic Configuration
-
Access Config File
- Open
system/config.php
using any text editor - Locate the following line:
define('APP_STAGE', 'Live');
- Change it to:
define('APP_STAGE', 'Dev');
- Open
Important Security Note
⚠️ Warning: Only enable Debug Mode temporarily for troubleshooting. Always disable it in production environments to prevent exposing sensitive information.
What Debug Mode Does
-
Enhanced Error Reporting
- Displays detailed error messages
- Shows exact file locations and line numbers
- Provides code snippets around error locations
- Records comprehensive system logs
-
Email System Logging
- Tracks detailed email sending attempts
- Records SMTP communication logs
- Stores email rendering information
Debugging JavaScript Issues
Using Browser Developer Tools
-
Open Developer Console
- Right-click on any empty space on the page
- Select "Inspect" or press:
- Windows/Linux:
Control+Shift+I
- Mac:
Command+Option+I
- Windows/Linux:
- Click on the "Console" tab
-
Reading Error Messages
- Red text indicates errors
- Yellow warnings show potential issues
- Stack traces show error origins
Debugging AJAX Requests
-
Network Tab Analysis
- Open Developer Tools
- Select the "Network" tab
- Click "Fetch/XHR" sub-tab
- Perform the action that's failing
- Click on the relevant request URL
-
Common AJAX Issues
- Look for:
- HTTP status codes
- Response data
- Request headers
- Error messages in response
- Look for:
Troubleshooting Steps
-
Initial Investigation
- Enable Debug Mode
- Clear browser cache
- Reproduce the issue
- Document the error messages
-
Log Analysis
- Check system logs
- Review error messages
- Note any patterns or recurring issues
-
Common Issues and Solutions
a. Blank Page
- Enable Debug Mode
- Check PHP error logs
- Verify PHP memory limits
- Review database connections
b. Database Errors
- Confirm database credentials
- Check database permissions
c. JavaScript Errors
- Check browser console
- Verify script loading order
- Look for syntax errors
Error Documentation - Screenshot error messages - Note steps to reproduce issues
Getting Help
If you cannot resolve an issue using Debug Mode:
-
Support Resources
- Check CloudOnex documentation
-
Contacting Support
- Provide Debug Mode screenshot
- Share steps to reproduce
- Include system environment details
- Describe expected vs actual behavior
Disabling Debug Mode
After completing troubleshooting:
-
Restore Production Settings
- Edit
system/config.php
- Change back to:
define('APP_STAGE', 'Live');
- Edit