Skip to content

IDE Integration

View coverage directly in your editor. Covered lines show green, uncovered lines show red.


The Coverage Gutters extension is the best way to view LCOV coverage in VS Code.

805K+ Installs

Most popular VS Code coverage extension

5/5 Rating

Highly rated with active maintenance

  1. Install the extension

    Open VS Code and install from the Extensions panel:

    • Search for “Coverage Gutters”
    • Or use the command: code --install-extension ryanluker.vscode-coverage-gutters
  2. Generate LCOV coverage

    Configure skytest to output LCOV format:

    sky.toml
    [test.coverage]
    enabled = true
    output = "coverage.lcov"

    Run your tests:

    Terminal window
    skytest tests/
  3. View coverage

    • Open a source file
    • Press Cmd+Shift+7 (macOS) or Ctrl+Shift+7 (Windows/Linux)
    • Or click “Watch” in the status bar for auto-updates

After enabling coverage display:

1 │ 🟢 │ def add(a, b):
2 │ 🟢 │ return a + b
3 │ │
4 │ 🟢 │ def divide(a, b):
5 │ 🟢 │ if b == 0:
6 │ 🔴 │ return None ← Uncovered!
7 │ 🟢 │ return a / b
Gutter ColorMeaning
GreenLine was executed
RedLine was NOT executed
No colorNon-executable (blank, comment)
ActionmacOSWindows/Linux
Display CoverageCmd+Shift+7Ctrl+Shift+7
Watch ModeCmd+Shift+8Ctrl+Shift+8
Remove CoverageCmd+Shift+9Ctrl+Shift+9

Enable automatic updates when the coverage file changes:

  1. Click Watch in the VS Code status bar
  2. Run your tests - coverage updates automatically
  3. No need to manually refresh

Optional settings in .vscode/settings.json:

.vscode/settings.json
{
"coverage-gutters.coverageFileNames": [
"coverage.lcov",
"lcov.info"
],
"coverage-gutters.showLineCoverage": true,
"coverage-gutters.showRulerCoverage": true
}

The simplest approach for JetBrains users is to generate an HTML report:

sky.toml
[test.coverage]
enabled = true
output = "coverage.html"
Terminal window
skytest tests/
open coverage.html

The HTML report opens in your browser with:

  • File list with coverage percentages
  • Color-coded badges
  • Expandable line-by-line details

Generate a browsable HTML report from LCOV:

Terminal window
# Generate LCOV
skytest --coverage --coverage-output=coverage.lcov tests/
# Convert to HTML (requires lcov package)
genhtml coverage.lcov --output-directory coverage-html
# Open in browser
open coverage-html/index.html
Terminal window
brew install lcov

Use the nvim-coverage plugin for LCOV support.

~/.config/nvim/lua/plugins/coverage.lua
-- Using lazy.nvim
return {
"andythigpen/nvim-coverage",
dependencies = "nvim-lua/plenary.nvim",
config = function()
require("coverage").setup({
signs = {
covered = { hl = "CoverageCovered", text = "▎" },
uncovered = { hl = "CoverageUncovered", text = "▎" },
},
})
end,
}
:CoverageLoad " Load coverage.lcov
:CoverageShow " Show coverage signs
:CoverageToggle " Toggle display
:CoverageSummary " Show summary

For editors without LCOV extensions, use the HTML output:

sky.toml
[test.coverage]
enabled = true
output = "coverage.html"

The HTML report is self-contained and works in any browser.


EditorMethodFormat
VS CodeCoverage Gutters extensionLCOV
JetBrainsHTML report in browserHTML
Neovimnvim-coverage pluginLCOV
OthersHTML report in browserHTML

  1. Check the file exists: ls coverage.lcov
  2. Verify LCOV format: File should start with TN: or SF:
  3. Try manual display: Press Cmd+Shift+7 / Ctrl+Shift+7
  4. Check status bar: Click on coverage status for error messages
  1. Regenerate coverage: Run tests again after code changes
  2. Check file paths: Paths in LCOV must match actual file locations
  3. Clear cache: In VS Code, run “Coverage Gutters: Remove Coverage”

Coverage Gutters looks for these files by default:

  • coverage.lcov
  • lcov.info
  • coverage/lcov.info

Update your output path to match, or configure the extension:

.vscode/settings.json
{
"coverage-gutters.coverageFileNames": [
"your-custom-path.lcov"
]
}