Code coverage with Coverage.jl in vscode

I followed the “tutorial” on

I manage to create .cov files for my local package as well as an lcov file after running the command LCOV.write("", coverage)

Is there a way to display the report in a nice way in vscode under windows?

I have tried Coverage Gutters but it does not seem to be working. I probably don’t use it correctly…

Is there a way to render the lcov file nicely in vscode?

Thank you


Hey there,

Not sure if you solved your issue or not but I recently decided to do the same thing as I had codecov setup but didn’t want to have to push to github and wait for tests to run to see my code coverage, and I managed to get this working using Coverage.jl to produce a file and use Coverage Gutters extension with it. I noticed that for Coverage Gutters the default file it looks for is “”, so change the .info file name (call LCOV.write(“”, coverage)) if you haven’t already.


I just tried Coverage.LCOV.write(filepath, coverage) does not work. Here is the complete workflow that worked for me

Julia line coverage information in VS Code

First generate .cov files:

using Pkg
Pkg.test("MyPackage"; coverage=true)


using Coverage
coverage = process_folder()
open("", "w") do io
    LCOV.write(io, coverage)

Finally, open a source file in VS Code and run the command “Coverage Gutters: Display Coverage” in the VS Code Command Pallet.


LCOV.write(“”, coverage)

the working call is

 LCOV.writefile(“”, coverage)
1 Like