Filter Debugging Tutorial

This guide covers debugging ADTF Filters in Visual Studio. After reading this guide, you will know:

Where are we?

In the Data Generator Filter Tutorial we created a Filters to generate and send data samples. In the Data Processor Filter Tutorial we created a Filters that receives data samples and uses them to calculate a new data sample. In the ADTF Project Tutorial we created a project with the Configuration Editor. The project contains an ADTF Session which you can start using the ADTF Launcher. The ADTF Session references an ADTF Graph file which contains a Filter Graph that makes use of our two new Filters. Now we want to debug our Filters in Visual Studio.

How to debug a Filters?

Open the Visual Studio solution containing the Filters you want to debug and open the Visual Studio Solution Explorer.

Find the Filter that you want to debug and open its properties by right clicking on the project. For example the tutorial_filter_data_generator.
We need to edit Command and Command Arguments in Configuration Properties->Debugging

Debugging setup

In Command we specify the path of the program to execute when debugging this Filter. We want to run our previously created ADTF Session and therefore need to start the adtf_launcher located in:
"ADTF_INSTALL_DIRECTORY\bin\adtf_launcher.exe".

As Command Arguments we use:


Example debugging setup


Finally we need to set our project as "Startup Project" in the Solution Explorer and set a break point somewhere in our Filter code. Now we can start the Local Windows Debugger and debug our Filter.

Local Windows Debugger

We can edit our ADTF Session in the Configuration Editor and see the Filter's behaviour change when we restart the debugger. For example if we change the velocity_change_rate property of the Tutorial Filter Data Generator 1 object to 3, the console ouput changes.

Alternatively, we can run an ADTF Session using the Configuration Editor and use Visual Studio to attach to the process and debug it. To do so, open the process dialog in Debug/Attach and choose the adtf_launcher.exe process.

Local Windows Debugger

Where to go next?

Have a look at the Signal Provider Filter to see how to create signals and display them in a signal view.