ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Coverage file not found (from "Watch" to "No Coverage") #380

Closed Frank-D closed 1 year ago

Frank-D commented 1 year ago

Hi! Another "coverage file not found" issue, I'm sorry! 😆

I'm not sure what to describe in particular, other than:

  1. Using VS Code 1.72.2
  2. Working on a multi-modules java/spring/gradle project
  3. Used gradle 'jacoco' plugin to get my jococo.xml code coverage report properly generated.
  4. Installed the coverage-gutters extension, and whenever I click on the "watch" link from the bottom status bar, it starts spinning, then nothing happens, and it just displays "No Coverage".
  5. I tried copying my "jococo.xml" file at several other locations, such as, outside my sub-module at the very root of the workspace, but still the same behaviour, e.g. "No Coverage" after the watch spins for a second or two.

I tried playing with all the settings I saw perhaps relevant (coverage-gutters.coverageFileNames, coverage-gutters.manualCoverageFilePaths, coverage-gutters.coverageBaseDir and coverage-gutters.coverageReportFileName) with different mix and match of configs (different file names, different relative and absolute paths, etc), but no luck.

I was at some point able to get a vs code warning notification in the bottom-right corner generated by the extension to display an error message telling me that it couldn't find my coverage file, but the funny thing is, whenever I was actually fixing the path to my jococo.xml report file, then the message disappeared and back to the no notification behaviour where I only get the watch link to spin and then show as "No Coverage", which is telling me that it seems like it's probably actually finding my report file with all the default settings, but crashing perhaps trying to read it?

Not sure if there's a location/log somewhere that I could open and see how this extension is doing, e.g. 1) is it finding my coverage file yes or no, and 2) if yes, then what's the error that is perhaps causing the extension to crash trying to process my coverage file...?

ryanluker commented 1 year ago

Thanks for the issue @Frank-D, there is also extra logging you can grab to help us triage your issue. (see gif in link below) https://github.com/ryanluker/vscode-coverage-gutters/issues/228#issuecomment-524641795

Can you also confirm that the jococo.xml file is in the workspace folder somewhere as well?

Frank-D commented 1 year ago

Thanks @ryanluker for your quick response and additional details!

For an odd reason, I let the extension on the side for a little while after submitting this issue and kept coding, and at some point, I had to go back to the java class file to check something, and suddenly, it was all highlighted of green/red/yellow lines (mostly of green : P) hourray!

Unfortunately, I have absolutely no idea whatsoever how it happened, I don't recall playing at all with any config since I filed that issue and kept coding random java code until it worked randomly some hours later....so I won't be able to help anyone having the same issue with this ticket I'm sorry..

Anyhow, happy ending, and this extension is amazing keep on the great work! ; -)