code coverage highlighting broken, and general question

Sysprogs forums Forums VisualGDB code coverage highlighting broken, and general question

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23537
    dabramson
    Participant

    Code coverage highlighting is not working (see the attached picture). I have VS 15.9.5 and VGDB 5.4R2 build 2751

    The “General Question” part

    It seems that I cannot get coverage results on code in a shared object unless I also enable coverage on the unit test project that calls the shared object. Is that how it is intended to work?

    It would be nice if you only had to turn coverage on in the projects containing product code. This would avoid the need to filter out results from unit tests. I was able to get results for ONLY the code in the shared object by turning code coverage on in the test project and then explicitly turning it off in EVERY file in the test project (as hinted at in the tutorial https://visualgdb.com/tutorials/profiler/linux/coverage/). So I guess there is a workaround, but it requires developers to have to remember to disable instrumentation for every test file they add to a test project.

    Attachments:
    You must be logged in to view attached files.
    #23541
    support
    Keymaster

    Hi,

    Please enable Clang IntelliSense for your projects while analyzing the code coverage. The coverage highlighting overlays are a part of it and won’t work with the regular VC++ IntelliSense (you can quickly switch between the two via a button on the Clang IntelliSense Diagnostics Console).

    You don’t need to enable the code coverage instrumentation (i.e. injection of coverage code into the compiled code) for the main project. Simply choose “no” when VisualGDB suggests doing it after you enable code coverage via VisualGDB Project Properties. This will keep the code uninstrumented, but will let VisualGDB look for coverage reports produced by the referenced library projects.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.