Renders Line and Branch coverage from lcov.info files interactively.

lcov.info file and you're in business!lcov.info files (e.g. one for the entire project, one for the last single test run)Ctrl+T or Cmd+T then choose Show Coverage Report

lcov.info fileslcov.info files generated by istanbul e.g.istanbul cover --report lcovonly ./node_modules/mocha/bin/_mocha -- -R spec test.jslcov.info files via the setting lcov.path. e.g:"lcov.path": [
"./.build/coverage/lcov.info",
"./.build/coverage-single/lcov.info"
]
lcov.watch. e.g. to execute a certain command any time a .js file is changed:"lcov.watch": [{
"pattern": "**/*.js",
"command": "npm run test-coverage"
}]
Ctrl+T or Cmd+T then choose Enable watcherslcov.sourceMaps."lcov.sourceMaps": true
View > Output and choose lcov."lcov.branchCoverage": "off" or "simple" (default) or "full"
exports.example = function (a) {
if (a) {
console.log('1');
}
}
The above source code contains a single branch block consisting of two branches.
| Test Code | if taken | else taken | "simple" | "full" |
|---|---|---|---|---|
//no calls |
∅ | ∅ | ![]() |
![]() |
example(1) |
✓ | ∅ | ![]() |
![]() |
example(0) |
∅ | ✓ | ![]() |
![]() |
example(0), example(1) |
✓ | ✓ | ![]() |
![]() |
exports.example = function (a, b) {
if (a && b) {
console.log('1');
}
}
For the table columns: * IF = if taken * ELSE = else taken * A? = a evaluated * B? = b evaluated
| Test Code | IF | ELSE | A? | B? | "simple" | "full" |
|---|---|---|---|---|---|---|
//no calls |
∅ | ∅ | ∅ | ∅ | ![]() |
![]() |
example(0,0) |
∅ | ✓ | ✓ | ∅ | ![]() |
![]() |
example(0,1) |
∅ | ✓ | ✓ | ∅ | ![]() |
![]() |
example(1,0) |
∅ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(1,1) |
✓ | ∅ | ✓ | ✓ | ![]() |
![]() |
example(0,0), example(0,1) |
∅ | ✓ | ✓ | ∅ | ![]() |
![]() |
example(0,0), example(1,0) |
∅ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,0), example(1,1) |
✓ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,1), example(1,0) |
∅ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,1), example(1,1) |
✓ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(1,0), example(1,1) |
✓ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,0), example(0,1), example(1,0) |
∅ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,0), example(0,1), example(1,1) |
✓ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,0), example(1,0), example(1,1) |
✓ | ✓ | ✓ | ✓ | ![]() |
![]() |
example(0,1), example(1,0), example(1,1) |
✓ | ✓ | ✓ | ✓ | ![]() |
![]() |
exports.example = function (a, b, c) {
if (a && b && c) {
console.log('1');
}
}
For the table columns: * IF = if taken * ELSE = else taken * A? = a evaluated * B? = b evaluated * C? = c evaluated
| Test Code | IF | ELSE | A? | B? | C? | "full" |
|---|---|---|---|---|---|---|
//no calls |
∅ | ∅ | ∅ | ∅ | ∅ | ![]() |
example(0,0,0) |
∅ | ✓ | ✓ | ∅ | ∅ | ![]() |
example(1,0,0) |
∅ | ✓ | ✓ | ✓ | ∅ | ![]() |
example(1,1,0) |
∅ | ✓ | ✓ | ✓ | ✓ | ![]() |
example(1,1,1) |
✓ | ∅ | ✓ | ✓ | ✓ | ![]() |
$ claude mcp add vscode-lcov \
-- python -m otcore.mcp_server <graph>