CLion Plugin

The covdbg plugin for CLion measures C++ code coverage from inside the IDE. covdbg measures the running process directly, so you run the binary you already build, without an instrumented build. The result appears in CLion's own coverage view.

Install covdbg for CLion from the JetBrains Marketplace

The plugin is free and open source under the Apache 2.0 license. Its source is at liasoft/covdbg-clion.

Features

Run any configuration under covdbg

Pick Run 'target' with Covdbg from the run configuration dropdown, or create a covdbg run configuration. The plugin puts covdbg in front of your target and leaves the rest of the run to CLion: build before launch, the toolchain environment, environment variables, input redirection, test filters, and the test tree with rerun of failed tests all work as in a normal run.

Each run writes .covdbg/<target>.covdb under the project root.

Coverage in the editor

Results load into CLion's coverage UI:

  • Gutter marks for covered, partially covered and not covered lines, with hit counts.
  • The Coverage tool window, with percentages per directory and per file.
  • Run history under Show Coverage Data, to go back to an earlier run.

A line is partially covered when some of the code covdbg mapped to it ran and some did not, for example an if whose branch was never taken. A hit count alone cannot show that.

covdbg analyses the binary before running it, so functions the run never executes already show with zero hits. Code in a binary the run never loads, such as a static library no test links, is left out unless you list that binary under baseline: in the configuration file.

Import and export

  • Import any existing .covdb file with Import External Coverage Report, including databases from CI or a colleague.
  • Export an offline HTML report from Tools | covdbg or the coverage section of the Run menu.

Sign-in and configuration from the IDE

  • Sign in from Tools | covdbg | Sign In to covdbg, or click the covdbg widget in the status bar, which shows who is signed in. The plugin shows the sign-in code in a notification, with buttons to open the page and copy the code.
  • Project tokens: when COVDBG_PROJECT_TOKEN is set in the environment, the plugin uses it, as in CI.
  • Starter configuration: Tools | covdbg | Create .covdbg.yaml writes a .covdbg.yaml in the project root. Commit it and adjust the include and exclude patterns to decide what is measured.

Clear results

The plugin reports what covdbg did, from its exit code and output:

What you see What happened
Coverage percentages The run succeeded and the database is loaded
This run is not licensed covdbg refused the run and wrote no database. Sign in, or set COVDBG_PROJECT_TOKEN
No functions passed the coverage filter The filters in .covdbg.yaml matched nothing
No .covdbg.yaml found Create one; the notification offers to
covdbg rejected an option The installed covdbg is probably older than 1.3.0
covdbg was not found covdbg is not on PATH or at a known install location

Requirements

Requirement Supported
CLion 2025.3 through 2026.2
Platform Windows
Toolchain MSVC (Visual Studio). WSL, MinGW and Cygwin toolchains are not supported
covdbg 1.3.0 or newer, installed separately. The plugin runs covdbg.exe and does not bundle it
Licensing A signed-in developer, or COVDBG_PROJECT_TOKEN in the environment
Configuration A .covdbg.yaml in the repository

Getting started

  1. Install covdbg from the download page and the plugin from the JetBrains Marketplace. The plugin finds covdbg on PATH, then in %ProgramFiles%\Liasoft\covdbg and %LOCALAPPDATA%\Programs\covdbg.
  2. Sign in with Tools | covdbg | Sign In to covdbg and confirm the code in your browser.
  3. Create a configuration with Tools | covdbg | Create .covdbg.yaml, and set the include and exclude patterns for your project.
  4. Run your target or tests with Run 'target' with Covdbg.

Settings

Project settings are under Settings | Build, Execution, Deployment | Covdbg. The page also shows which covdbg executable was found and its version.

Setting Effect
Covdbg path Overrides the automatic lookup, for example to use a different covdbg build
Default config path Passed as --config. A relative path starts at the project root. Empty lets covdbg find .covdbg.yaml from the working directory
Log level Passed as --log-level
Log file Passed as --log-file. Empty uses .covdbg/Logs/covdbg.log in the working directory
Symbol engine Passed as --symbol-engine. Empty uses covdbg's default
Follow child processes Passes --follow-children when running CLion configurations. covdbg run configurations have their own checkbox

Telemetry is a covdbg setting, not a plugin setting. See Data and Telemetry.

Licensing

The plugin itself is free. Runs are licensed like any covdbg run: free for open source, free for personal use on one private repository at a time, and team seats for everything else. See pricing and the Licensing FAQ.

Feedback

Report problems with the plugin at liasoft/covdbg-clion issues. For covdbg itself, see support.

We store your theme and cookie choices to remember your preferences. With your permission, Google Analytics and our self-hosted Matomo help us understand how this website is used.

You can change your choice using Cookie settings in the footer. Cookie policy · Privacy policy