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

Colors next to code prevents user from setting/removing a breakpoint #87

Closed pintocarlos closed 7 years ago

pintocarlos commented 7 years ago

When you try to set a breakpoint on a given line that is showing coverage report (green or red) it does not let you set/remove a breakpoint.

Anyone else experiencing this?

ryanluker commented 7 years ago

Hey carlos, currently the vscode api only allows one gutter element at a time sadly ☹️ so if you use the gutter coverage you need to switch it off to interact with the breakpoints ref. The other option I was going to suggest was to use the line coverage option with gutters off which would have given you something like cover-break-1

"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true

but there appears to be an issue where simply having gutter coverage false does not enable the breakpoints again. After a quick look in the code I could get the above screenshot to work by tinkering with the rendering options here so it shouldnt be too hard to fix this. I will add this to the next release, thanks for submitting the issue!

pintocarlos commented 7 years ago

Thanks for replying. I think the solution suggested would work great for now that VSCode doesnt allow multiple gutters elements. Ideally if it did allow it, you could layer the coverage underneath the "breakpoint layer". Thanks for looking into this. I'll he happy to test things out in your next release 👍

ryanluker commented 7 years ago

@pintocarlos this issue will be fixed in 1.1.2 which will go out shortly. here is the commit if you are interested in the fix https://github.com/ryanluker/vscode-coverage-gutters/pull/91/commits/2ec3050b0da616e86bbed087417cafb52fb37d02

pintocarlos commented 7 years ago

Thank you @ryanluker

eddex commented 4 years ago

I just experienced the same issue. Thanks @ryanluker for explaining the workaround!

Nowadays (VS Code 1.44.2) one can also change the settings from the UI:

image

JoseFMP commented 4 years ago

So, this still pending and we are in 2020. Any news?

ryanluker commented 4 years ago

@JoseFMP based on my reading of the vscode api and the conversation history here https://github.com/microsoft/vscode/issues/73784 I assume that microsoft wants you to create decorators for this in the line itself instead of using the gutter area sadly (this would be similar to the git lens style ticket here https://github.com/ryanluker/vscode-coverage-gutters/issues/232 and https://github.com/ryanluker/vscode-coverage-gutters/issues/194).