Debug 360 Help

Debug 360 Help

Welcome to the Debug 360 plugin by Orcus Labs! This powerful tool enhances WordPress debugging by providing detailed error logging, notification options, and advanced features for troubleshooting your site. Whether you’re a site administrator or a developer, this guide will help you get started and make the most of Debug 360.

Table of Contents

Overview

Debug 360 is a WordPress plugin designed to streamline debugging by capturing, logging, and managing PHP errors on your site. It offers a user-friendly interface to view logs, configure error handling, and set up notifications. With premium features (via Freemius integration), it extends functionality with webhook support for real-time error reporting.

Key capabilities:

  • View and manage error logs in table or log format.
  • Enable a custom error handler to override PHP defaults.
  • Send email notifications to administrators for critical errors.
  • Integrate with external services via webhooks (premium feature).

Installation

  1. Download and Install:
    • From the WordPress admin dashboard, go to Plugins > Add New.
    • Search for “Debug 360” by Orcus Labs.
    • Click Install Now, then Activate.
  2. Premium Features (optional):
    • After activation, opt into the premium version via the Freemius prompt to unlock advanced features like webhook integration.

Getting Started

Once activated, Debug 360 adds a menu item to your WordPress admin dashboard:

  • Navigate to Debug 360 in the sidebar to access the plugin’s main interface.

Initial Setup

  1. Visit the Debug 360 menu.
  2. Enable Custom Error Handler: Enabling the custom error handler turns Debug 360 on and off. The custom error handler allows Debug 360 to capture debug log errors and manage them. With the custom error handler turned off, it will default to creating the WordPress debug.log file.
  3. WP_Debug: This button turns all WordPress debug capturing on or off. In the off setting, Debug 360 will not capture any errors nor will WordPress create the debug.log file
  4. WP_Debug_Log: This button enables and disables logging of errors. If disabled, and WP_Debug is enabled, error logging will be sent to the default PHP error location.
  5. WP_Debug_Display: Enabling or disabling this button will tell WordPress to display errors on your website. Use with caution as any error will also be displayed to your visitors.
  6. Script_Debug: If enabled it will will force WordPress to use the “dev” versions of core CSS and JavaScript files rather than the minified versions that are normally loaded. This is useful for developers testing modifications to any built-in .js or .css files.

Main Features

Debug Log Viewer

The Debug Log Viewer displays PHP errors logged by WordPress or captured by the custom error handler.

Log View

Table View

Ignore View

  • Views:
    • Table View: Shows errors in a sortable table with columns for timestamp, error level, and message. Use filters to narrow by error type (e.g., Fatal Error, Warning).
    • Log View: Displays raw log entries with optional syntax highlighting.
    • Errors Ignored: Quite often, notices, warnings or other error log entries will appear that can safely be ignored. By ignoring an entry, it will no longer appear in your error log should it occur.
  • Actions:
    • Filter errors by type using buttons above the table.
    • Sort by timestamp or error level.
    • Delete individual logs or bulk delete selected entries.
    • Clear all logs with the Clear Debug Log button.
  • Pagination: Navigate large log sets with page links or a slider.

Custom Error Handler

Debug 360 can replace PHP’s default error handling with a custom system.

  • Enable: Toggle Enable Custom Error Handler in the settings sidebar.
  • Behavior:
    • Recognizes the current default debug.log and if it exists, reads it into the WordPress database and deletes the debug.log file.
    • Captures all PHP errors (warnings, notices, fatal errors).
    • Logs them to the WordPress database.
    • Disables PHP’s default error logging.
  • Use Case: Ideal for capturing errors without cluttering debug.log or exposing them to users.

Email Notifications

Receive alerts when errors occur.

  • Enable: Toggle Notify Admin via Email in the settings sidebar.
  • Configure:
    • Select an error level threshold (e.g., Fatal Error, Error, Warning, Notice) in the Error Level to Notify dropdown.
  • Behavior:
    • Sends an HTML email to the admin email address with error details.
    • Limits emails to once per day per unique error to prevent spam.

Settings

The settings sidebar (on the Debug 360 admin page) lets you configure the plugin:

  • Debugging Options:
    • Enable Custom Error Handler: Activate the custom error handler.
    • WP_DEBUG: Toggle WordPress debug mode.
    • WP_DEBUG_LOG: Enable logging to wp-content/debug.log.
    • WP_DEBUG_DISPLAY: Show errors on-screen (not recommended for live sites).
    • SCRIPT_DEBUG: Load unminified scripts/CSS.
  • Notification Settings:
    • Notify Admin via Email: Enable email alerts.
    • Error Level to Notify: Set the minimum error severity for notifications.
  • Save Settings: Click Save Settings to apply changes. This updates wp-config.php. Debug 360 will automatically create a backup of your previous wp-config file. I will maintain the 3 most recent backup copies.

Note: Modifying wp-config.php requires write permissions. Check file permissions if you see errors.

Advanced Settings (Premium)

Available with the premium version via Freemius.

  • Access: Under Debug 360 > Advanced Settings.
  • Webhooks:
    • Create and manage webhooks to send error notifications to external services (e.g., Slack, Discord).
    • Configure webhook URL, notification level, and active status.
    • Test webhooks directly from the interface.
  • Use Case: Real-time error monitoring for development teams or external logging systems.

Example setting up Discord for Webhooks

In Discord, first create the channel where you want to have the Debug 360 messages delivered.
Beside the channel name, click on the gear icon to edit the channel. Your Discord should now look like this:

Click on “Integrations” and then click on “Webhooks” Click on “New Webhook” and it should look similar to this. Give your webhook a name and choose the channel where the Debug 360 messages will be sent. Then, click on the “Copy Webhook URL”

Select “Advanced” in the Debug 360 menu and then click “Create Webhook”. Add a name for your webhook and paste the URL you copied from Discord into the webhook URL. Choose the notification level in Debug 360, set the webhook to active and select “Save Webhook”. You can then click on the wrench icon beside the webhook name to send a test message to Discord. If everything worked properly, you should now see a test message in Slack.

Example setting up Slack for Webhooks

In order to get Debug 360 to send error messages to Slack, you’ll need to set up a workflow in Slack.

Create a new Workflow

Select “Choose an event”

Select “From a webhook”

Select “Set up Variables”

Enter the key name “content” in lower case.

Slack will now show you an example body. Select “Continue”.

Your workflow should now look like this. Click “+ Add steps”

Choose “Send a message to a channel”

Click “() Insert a variable” and choose “content”

And select the channel where you want the error messages delivered.

Your workflow should now look like this. Click the “Copy Link”. Select “Advanced” in the Debug 360 menu and then click “Create Webhook”. Add a name for your webhook and paste the URL you copied from Slack into the Webhook URL. Then select “Save” in Slack to create the new workflow.

Choose the notification level in Debug 360, set the webhook to active and select “Save Webhook”. You can then click on the wrench icon beside the webhook name to send a test message to Slack. If everything worked properly, you should now see a test message in Slack.

Troubleshooting

  • No Errors Displayed:
    • Ensure WP_DEBUG or the custom error handler is enabled.
  • Emails Not Sending:
    • Verify your admin email (Settings > General) is valid.
    • Check server mail configuration.
    • Check your spam folder.
  • Webhook Issues (Premium):
    • Test the webhook URL manually to ensure it’s reachable.
    • Review error responses in the Advanced Settings interface.
    • Test message failed to Orcus Labs Test Slack Server with response code: 400. Body: {“ok”:false,”error”:”invalid_input”}. This likely indicates an expired subscription to Slack.
  • Settings Not Saving:
    • Confirm wp-config.php is writable by the web server.
    • Look for backup files (wp-config-backup-*.php) if updates fail.
  • “Debug 360: /* That’s all, stop editing! Happy publishing. */” not found in wp-config.php:
    • Debug 360 looks for lines like the one above in your wp-config.php file. This is a marker that tells Debug 360 where to stop editing that file. If it’s unable to find that line in the wp-config.php, it will be unable to save the correct debug info.
    • In order to repair this issue, you’ll need to ensure that that line is in the wp-config.php file immediately after your debug defines. It should look like this:

      define('WP_DEBUG', true);
      define( 'WP_DEBUG_LOG', true );
      /* That's all, stop editing! Happy publishing. */

Support

For assistance:

  • Help Page: Click the Help button in the Debug 360 menu to visit our website.
  • Contact: Reach out via support@orcuslabs.com or via the Contact Us button on the dashboard menu.