Monday, February 01, 2021

How to remove code coverage highlighting from your code

In Visual Studio, there is an option called "Analyze Code Coverage for All Tests" in the Test menu. After running that, the code is colored to allow you to see which sections are covered by tests or not. 

You can view previous code coverage results from the Test\Code Coverage Results menu item. In this pane, you can turn off the coloring by clicking the "Show Code Coverage Coloring" button.


See also https://stackoverflow.com/questions/29947836/dotcover-how-to-remove-code-coverage-highlighting-from-your-code

and https://developercommunity.visualstudio.com/idea/908105/remove-highlighting-after-analyze-code-coverage.html