Welcome to covdbg! This guide will help you get started with installing and using covdbg for code coverage analysis on Windows.
- Windows 10 (x64) or Windows 11
- PDB files for your native applications (required for symbol resolution)
- A covdbg license (via
COVDBG_LICENSEorCOVDBG_LICENSE_FILEenvironment variable) or an open source project where--fetch-licensecan be used - covdbg installed (see Installation section below)
Follow the Installation Guide to set up covdbg on your system. You can choose between the MSI installer for a machine-wide installation or a portable ZIP archive for a flexible setup.
Ensure your native application is built with debug symbols (PDB files). This is essential for covdbg to map executed code back to source lines.
For this example, we will use a sample application called app.exe with its corresponding app.pdb.
To build the example application using Visual Studio:
- Configure the project with CMake.
cmake -S . -B build- Build the project.
cmake --build build --config DebugAfter this is done you should have app.exe and app.pdb in the build/Debug directory.
- To collect coverage data while running your application, use the following command:
covdbg --config .covdbg.yaml --output .\build\Debug\app.covdb .\build\Debug\app.exeIf you are working on an open source project and do not have a license set up, you can use the --fetch-license option to automatically obtain a license:
covdbg --fetch-license --config .covdbg.yaml --output .\build\Debug\app.covdb .\build\Debug\app.exe- To convert the coverage data into the LCOV format for use with other tools, run:
covdbg convert --format LCOV --input .\build\Debug\app.covdb --output .\build\Debug\app.lcov