Debug Settings

The Debug Settings page provides powerful tools for troubleshooting, analyzing order calculations, reviewing system logs, and monitoring performance. This page is essential for diagnosing issues, verifying calculations, and understanding how Alpha Insights processes your data.

Accessing Debug Settings

  1. Go to Alpha Insights → Settings
  2. Navigate to the Debug settings page
  3. You'll see debugging tools and system logs

Who Should Use Debug Settings

Note: This page contains technical information. If you're just getting started, you may not need to use these tools.

Debug Order Calculations

The most useful tool on this page - see complete calculation breakdown for any specific order.

Debug Order ID

What It Does

Produces a complete output of all calculations, costs, and data for a specific order. This shows you exactly how Alpha Insights calculated profit for that order.

How to Use

  1. Find the order ID you want to debug
  2. On Debug Settings page, enter order ID in "Debug order ID" field
  3. Click Debug button
  4. Page reloads and shows complete calculation output below

Order Data Dump Output

When you debug an order, you'll see a detailed data dump including:

Order Information

Revenue Breakdown

Cost Breakdown

Profit Calculations

Line Item Details

For each product in the order:

Order Meta Data

When to Debug an Order

Verify calculations:

Troubleshoot issues:

Support requests:

Understanding Debug Output

Green values: Positive amounts (revenue, profit)

Red values: Negative amounts (costs, refunds, losses)

Bold labels: Key calculation fields

Nested arrays: Related data grouped together

WP Davies Logs

View system logs from Alpha Insights operations.

Log Display

The log section shows all available log files in a split-panel interface:

Left panel: List of available logs

Right panel: Log contents

Common Log Files

Facebook API Log:

Google Ads API Log:

General System Log:

Calculation Log:

Reading Log Entries

Each log entry typically includes:

Timestamp: When event occurred

Severity level:

Message: Description of what happened

Log Management

Automatic cleanup:

Manual log clearing:

Using Logs for Troubleshooting

Facebook sync issues:

  1. Open Facebook API Log
  2. Look for ERROR entries
  3. Check error messages
  4. Note timestamps of failures
  5. Provide to support if needed

Google Ads problems:

  1. Review Google Ads API Error Log
  2. Check for authentication errors
  3. Look for API quota issues
  4. Verify conversion tracking events

Calculation discrepancies:

  1. Check Calculation Log
  2. Look for order-specific entries
  3. Identify when calculation was last updated
  4. See if overrides were applied

Performance Reports

If available, shows performance metrics for various plugin operations.

Performance Metrics

Performance report table includes:

Report Type: What operation was measured

Metrics displayed:

Understanding Performance Data

Good performance indicators:

Performance issues:

When to Check Performance

Debugging Best Practices

Order Debugging

Log Review

Performance Monitoring

Working with Support

Providing Debug Information

When contacting WP Davies support, they may ask for debug data:

Order debug data:

  1. Debug the specific order in question
  2. Take screenshot of output or copy text
  3. Note the order ID clearly
  4. Include in support ticket

Log excerpts:

  1. Navigate to relevant log file
  2. Screenshot error entries
  3. Include timestamps
  4. Note which log file

Performance data:

  1. Screenshot performance report table
  2. Note which operations are slow
  3. Include store size context (order count)

What NOT to Share Publicly

Sensitive data in debug output:

Share with support only: Debug data should only go to official WP Davies support channels

Common Debug Scenarios

Scenario: Negative Profit on Order

  1. Note the order ID
  2. Go to Debug Settings
  3. Enter order ID and click Debug
  4. Review cost breakdown
  5. Identify which cost is unexpectedly high
  6. Check if product cost is correct
  7. Verify payment gateway fee calculation
  8. Confirm shipping cost is accurate

Scenario: Facebook Sync Not Working

  1. Go to Debug Settings
  2. Open Facebook API Log
  3. Look for ERROR entries
  4. Check error message
  5. Common issues:

Scenario: Reports Loading Slowly

  1. Go to Debug Settings
  2. Review Performance Reports
  3. Identify slow operations
  4. Check execution times
  5. If report generation is slow:

Scenario: Missing Product Costs

  1. Debug an order with the affected product
  2. Review line item details
  3. Check product cost field
  4. If showing 0 or default:

Advanced Debugging

For Developers

If you're a developer working with Alpha Insights:

Use WordPress debug constants:

Query Monitor plugin:

Browser developer tools:

Summary

Debug Settings provide:

While you may not need Debug Settings for everyday use, they're invaluable when something doesn't look right or when you need to verify how Alpha Insights is calculating your store's profitability. Keep this page bookmarked for troubleshooting needs!