805K+ Installs
Most popular VS Code coverage extension
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
Install the extension
Open VS Code and install from the Extensions panel:
code --install-extension ryanluker.vscode-coverage-guttersGenerate LCOV coverage
Configure skytest to output LCOV format:
[test.coverage]enabled = trueoutput = "coverage.lcov"Run your tests:
skytest tests/View coverage
Cmd+Shift+7 (macOS) or Ctrl+Shift+7 (Windows/Linux)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 Color | Meaning |
|---|---|
| Green | Line was executed |
| Red | Line was NOT executed |
| No color | Non-executable (blank, comment) |
| Action | macOS | Windows/Linux |
|---|---|---|
| Display Coverage | Cmd+Shift+7 | Ctrl+Shift+7 |
| Watch Mode | Cmd+Shift+8 | Ctrl+Shift+8 |
| Remove Coverage | Cmd+Shift+9 | Ctrl+Shift+9 |
Enable automatic updates when the coverage file changes:
Optional settings in .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:
[test.coverage]enabled = trueoutput = "coverage.html"skytest tests/open coverage.htmlThe HTML report opens in your browser with:
Generate a browsable HTML report from LCOV:
# Generate LCOVskytest --coverage --coverage-output=coverage.lcov tests/
# Convert to HTML (requires lcov package)genhtml coverage.lcov --output-directory coverage-html
# Open in browseropen coverage-html/index.htmlbrew install lcovapt-get install lcovdnf install lcovUse the nvim-coverage plugin for LCOV support.
-- Using lazy.nvimreturn { "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 summaryFor editors without LCOV extensions, use the HTML output:
[test.coverage]enabled = trueoutput = "coverage.html"The HTML report is self-contained and works in any browser.
| Editor | Method | Format |
|---|---|---|
| VS Code | Coverage Gutters extension | LCOV |
| JetBrains | HTML report in browser | HTML |
| Neovim | nvim-coverage plugin | LCOV |
| Others | HTML report in browser | HTML |
ls coverage.lcovTN: or SF:Cmd+Shift+7 / Ctrl+Shift+7Coverage Gutters looks for these files by default:
coverage.lcovlcov.infocoverage/lcov.infoUpdate your output path to match, or configure the extension:
{ "coverage-gutters.coverageFileNames": [ "your-custom-path.lcov" ]}