> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug the FlexiLayout

> Debug a FlexiLayout in ABBYY FlexiLayout Studio by building it, matching it with test images, comparing against a reference layout, and disabling elements.

Debug your FlexiLayout as you add blocks and elements to it. To test a FlexiLayout, [build](/flexi-capture/fls/settings/compile) it and [match](/flexi-capture/fls/settings/analyze) it with all the test images. Check that the FlexiLayout has no errors and that all of the objects and blocks can be detected.

A FlexiLayout may fail to find elements or blocks on an image because the searched object is outside the search area or does not match the parameters specified for the element. Therefore, debugging a FlexiLayout consists of finding images with errors, adjusting the description, and re-applying it to the images. A corrected FlexiLayout must be applied both to problem pages (to make sure that the error has been rectified) and to the rest of the pages (to make sure that your corrections have had no adverse effect on them).

## Use a Reference layout as a benchmark

Additionally, when you add new elements, be sure that they are matched correctly on all the pages of the test batch. This means that you will review the results of matching many times while you are creating a FlexiLayout. If there are several dozen images in the batch, this procedure may be very tiresome.

To make debugging your FlexiLayout easier, you can create a **Reference layout**, that is, the layout you consider to be correct and which you want to use as a benchmark. When matching your FlexiLayout with a page for which a Reference layout is available, the differences between the benchmark and the matching results (**Matched layout**) are detected automatically.

The difference between the Reference layout and the Matched layout is represented as a percentage ratio of the areas of the blocks of each layout. Aim to make the Matched layout as close to the Reference layout as possible. A complete match of the Matched layout and the Reference layout corresponds to a value of 0% in the **Missing Areas** and **Excess Areas** columns in the **Batch** window. The higher the percentage points in these columns, the worse the match.

For more information, see [Reference layout](/flexi-capture/fls/settings/etalon).

## Disable or hide elements during debugging

While testing a FlexiLayout, you can disable or hide elements:

* **Disable an element** – Select **FlexiLayout** → **Elements** → **Disable**.
* **Hide an active block or element on the image** – Select **View** → **Images** → **Hide Active Blocks or Elements**.

## Related topics

* [Build a FlexiLayout](/flexi-capture/fls/settings/compile)
* [Match the FlexiLayout with images](/flexi-capture/fls/settings/analyze)
* [Reference layout](/flexi-capture/fls/settings/etalon)
* [Disable an element](/flexi-capture/fls/template/exclude-element)
* [Test elements](/flexi-capture/fls/settings/test-element)
* [Back up FlexiLayouts](/flexi-capture/fls/settings/backup)
