You are here: Start » Technical Issues » FTL Data Types Visualizers

FTL Data Types Visualizers

Data Visualizers

Data visualizers present data during the debugging session in a human-friendly form. Microsoft Visual Studio allows users to write custom visualizers for C++ data. FabImage Library is shipped with a set of visualizers for the most frequently used FTL data types: ftl::String, ftl::Array, ftl::Conditional and ftl::Optional.

Visualizers are automatically installed during installation of FabImage Library and are ready to use, but they are also available at ftl_visualizers subdirectory of FabImage Library installation path.

For more information about visualizers, please refer to the MSDN.

Example FTL data visualization

Please see the example variables definition below and their visualization without and with visualizers.

ftl::String str = L"Hello world";
ftl::Conditional<int> nil = ftl::NIL;
ftl::Conditional<int> conditionalFive = 5;
ftl::Array<int> array(3, 5);

Data preview without FTL visualizers installed:

The same data presented using FIL visualizers:

Image Watch extension

For Microsoft Visual Studio 2015, 2017 and 2019 an extension Image Watch is available. Image Watch allows to display images during debugging sessions in window similar to "Locals" or "Watch". To make Image Watch work correctly with fil::Image type, FabImage Library installer provides fil::Image visualizer for Image Watch. If one have Image Watch extension and FIL installed, preview of images can be enabled by choosing "View->Other Windows->Image Watch" from Microsoft Visual Studio menu.

fil::Image description for Image Watch extension is included in ftl.natvis file, which is stored in ftl_visualizers folder in FabImage Library installation directory. ftl.natvis file is installed automatically during FabImage Library installation.

When program is paused during debug session, all variables of type fil::Image can be displayed in Image Watch window, as shown below:

Image displayed inside Image Watch can be zoomed. When the close-up is large enough, decimal values of pixels' channel will be displayed. Hexadecimal values can be displayed instead, if appropriate option from context menu is selected.

Image Watch is quite powerful tool - one can copy address of given pixel, ignore alpha channel and much more. All options are described in its documentation, which is accessible from the Image Watch site at:

Previous: Memory Leak Detection in Microsoft Visual Studio Next: Optimizing Image Analysis for Speed