Skip to content

Debug

The Debug node logs the current pipeline data to the PHP error log. It is a pass-through node -- data flows through unchanged. Use it during development to inspect pipeline data at any point.

Configuration

PropertyTypeDefaultDescription
labelstringDebugA label to identify this debug output in the error log.

Input

Accepts any data type.

Output

Returns the input data unchanged.

How It Works

  1. The node formats the input data using print_r() (for arrays) or var_export() (for other types).
  2. It writes the output to the PHP error log with the prefix [WP-Nexus Debug: {label}].
  3. The input data passes through to the next node.

Log Output Example

[WP-Nexus Debug: After Filter] Array
(
    [0] => Array
        (
            [id] => 1
            [name] => Widget A
            [status] => active
        )
    [1] => Array
        (
            [id] => 3
            [name] => Widget C
            [status] => active
        )
)

Example Use Cases

Inspect data between pipeline steps

Table Query --> Filter --> Debug (label: "After Filter") --> Sort --> Debug (label: "After Sort") --> Result

Debug form submission data

Context --> Debug (label: "Form Input") --> Validate --> Debug (label: "After Validate") --> Save Row

Troubleshoot expression output

Table Query --> Set Field --> Debug (label: "After Set Field") --> Result

Viewing Debug Output

The debug output goes to the PHP error log. To view it:

  • wp-content/debug.log: If WP_DEBUG_LOG is true in wp-config.php.
  • PHP error log: Check the path configured in php.ini (error_log directive).
  • Server logs: Apache/Nginx error logs.

Enable WordPress debug logging:

php
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

WARNING

Remove Debug nodes from production pipelines. While they do not affect functionality (data passes through unchanged), they write to the error log on every request, which can fill disk space and slow down the site.