Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Visual Studio Code C++ Unit Test coverage?

We have a C++ project we're developing on Linux with gcc. We'd like to use Visual Studio Code--if we can ever get it configured properly--but we can't if it won't meet our needs.

Does Visual Studio Code show C++ unit test coverage? For example, like how Eclipse shows code coverage of JUnit tests? Can it even be configured to run unit tests with Google Test, for example?

like image 975
Frecklefoot Avatar asked Oct 15 '25 20:10

Frecklefoot


2 Answers

Code coverage reports seems to be available only in real Visual Studio Enterprise edition. For VS Code you can only utilize some command line utils, such as gcov.

like image 53
user7860670 Avatar answered Oct 17 '25 12:10

user7860670


Here's a link to Gcov Viewer plugin for vscode. that uses the output from gcc to Highlight the covered lines. and automate usage of e gcov .

like image 42
Erans Avatar answered Oct 17 '25 12:10

Erans



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!