DotCover: How to remove code coverage highlighting from your code
Asked Answered
B

4

26

I am using JetBrains' dotCover for writing my units tests in a .NET application. dotCover highlights the whole code base either green or red based on the code coverage, but I want to remove the highlights after I'm done checking the code coverage. So is there anyway to do this other than quitting Visual Studio, removing the Test Results folder and.dotUser file, and restarting the Visual Studio?

Basilius answered 29/4, 2015 at 15:13 Comment(0)
T
40

You can easily switch highlighting on and off by pressing Ctrl+Alt+K, H. Or you can click "Highlight code" on the toolbar of the "Coverage Results" window. enter image description here

Tubular answered 4/5, 2015 at 15:37 Comment(1)
Ctrl-Alt-K opens "Call Hierarchy" tab on my machineLuetic
N
21

The existing answers didn't work for me. I found it in the Resharper menu.

Resharper >> Cover >> Toggle Code Highlighting

Resharper - Cover - Toggle Code Highlighting

Nealey answered 9/6, 2015 at 8:55 Comment(1)
It seems that you've installed dotcover after you've installed resharper, so your keyboard shortcuts are not set for dotcover. R# Options -> Keyboard & Menus -> Apply Scheme should fix that. PS: Still not fixed in 2017Urion
B
4

Ok, after hours of playing with it, I realized how to remove it. You just need to close the unit testing session and it will remove it (closing the window or Unit Test Sessions window doesn't work).

enter image description here

Basilius answered 29/4, 2015 at 17:36 Comment(0)
D
4

In Visual Studio 2022: Simple ON or OFF

enter image description here

Derosier answered 22/2, 2023 at 21:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.