Skip to main content
Version: Latest (4.49.0-beta)


Debugging is an important part of developing flows. This section will explain about debugging in general and how to debug flows and code in flows.

Understand the Problem

Before you start debugging, it's crucial to understand the problem thoroughly. Reproduce the issue consistently and gather information about the symptoms, error messages, and the context in which the problem occurs. Understanding the problem helps you narrow down the potential causes.

Break the Problem Down

Complex issues are often easier to debug when broken down into smaller, manageable parts. Isolate the problematic code or component, and focus your debugging efforts on that specific area. One way of doing this is by limiting the data that goes into the flow. For example, if you are debugging a flow that retrieves data from the Content Store, you can use a filter to limit the number and type of objects that are retrieved.

Use Debugging Tools

Xill4 provides powerful debugging tools. Familiarize yourself with these tools, including the Debug mode and the log() function in the Code component. The Debug mode allows you to follow messages and see how they transform as they travel through the flow. The log() function allows you to log messages to the console, which can be useful for debugging code.

Test in Isolation

When debugging, focus on isolating the problem by testing individual components or functions separately. This helps you pinpoint the source of the issue more efficiently.

Be Systematic

Systematically test hypotheses about the root cause of the issue. Start with the most likely scenarios, gather evidence, and eliminate possibilities one by one.

Test Fixes Thoroughly

After identifying a potential fix, test it rigorously to ensure that it resolves the issue without introducing new problems

Review Recent Changes

If the issue surfaced after making recent code changes, review those changes carefully. Sometimes, a small code modification can introduce unexpected problems.

Testing on the Content Store

When testing involves making changes to the Content Store, make a backup of the Content Store before making any changes. This allows you to easily revert to the previous state if necessary. Do this continuously for the various stages of the migration or a flow you are testing.