Debug

I/O stages may produce side-effects while using debug mode. Click here for more information

Debugging

Debugging is a powerful tool that provides a safe environment to inspect, update, and test a pipeline.

How to Debug a Pipeline

First, click on the bug icon in the top left corner of the screen to show the debug tools.

Debug icon

The debug tools consist of three sections, and two buttons (Clear Results, and Run)

Section Purpose
Debug Used to specify the information that will be used to execute the debug run
Events A side-by-side diff of the event
State A side-by-side diff of the state

Debug tools

Performing a debug run

To perform a debug run:

  1. Start in the Debug section.
  2. Enter a value in to the “Debug Write” field.
    • This value is used as if it was an event.value emitted by a trigger (Or by performing a Test Write).
  3. Click the “Run” button
  4. If an error occurred that caused the debug run to fail it will appear in the “Results” section of the Debug panel
    • This only refers to errors such as a misconfigured “Debug Write” value for example that causes the whole debug run to fail.
    • This does not apply to stage errors which can be viewed by selecting the stage.

At this point you will notice that all of the status/statistics in the graph are replaced with the status/statistics of the debug run.

To view the real status/statistics again and start over, click the “Clear Results” button

Debugging Changes

The pipeline does not have to be saved to perform a debug run.

When the “Run” button is clicked the debug run will be executed using the current unsaved state of the pipeline that you’re working on.

This means that you can add stages, move stages around, and change settings on stages; and all of those changes will be included in the debug run.

Viewing Events

The Events panel shows a side-by-side diff comparing all of the incoming events (left), to outgoing events (right).

Some stages may produce more than one event (the breakup stage for example) in that case the paginator above the incoming and outgoing events can be used to click through the events that the stage processed.

Viewing State

The state of a pipeline is stored as an array of key/value objects.

If the pipeline is supplied some state, then that state will appear in this section.

Debugging a Pipeline that uses State

Expanding the “State” section in the Debug section provides a handful of actions and two fields that can be used to configure state when debugging a pipeline.

Filling in these fields manually is not recommended. See (Get Production) below

  • The “State” field is an array of key/value objects that represent the State of this pipeline
  • The “Dependency State” field is an object, where each property is the name of a subpipeline and it’s array of key/value State objects

Get Production - This button will automatically populate both fields with the current State of this pipeline (and all of it’s Subpipelines)

Get Debug Result - After performing a debug run the state can be cycled by pressing the “Get Debug Result” button which will replace the state in both fields with the results from the previous debug run.

Clear - Use the clear button to reset both fields

More Information

Is debug mode safe?

Debugging a Pipeline simulates a pipeline execution in a safe environment that will not impact the saved pipeline in any way.

  • The State, Status, and Statistics of the pipeline will not be impacted
  • Any Subpipelines will also be executed as a debug run, meaning all of the “safe environment” information here also applies to Subpipelines
  • Inputs, instances, and namespaces are read as Test Reads

Limitations - Debug runs can cause some side effects

What does the Debug Write field support?

Supported values

  • Expressions
  • Primitive values: String, number, boolean
  • Objects - must be wrapped in parenthesis
  • Arrays

Unsupported values

  • JavaScript
  • null
  • undefined

Note: Leaving Debug Write empty will default to an empty object {}

Unsupported stages

The following stages are currently unsupported in debug mode and will simply pass the event unchanged to the next stage in a debug run.

  • Size Buffer
  • Time Buffer
  • On Change