VisualStudioCoverageSensor line is out of range

Hi @mpaladin,

It happens on our source files, a lot of them. Until now, we’re not able to analyze C++ projects at all. At least with code coverage enabled. Which is disappointing.

This was addressed to @Sean_Jost. Maybe he can explain a little bit more what he excluded.


I attached our findings below. Maybe they will help one or the other:

  1. We noticed that each broken source file contains a function that is covered by two source files (.h; .cpp). All other functions are covered by a single file.

  2. We noticed different behaviors as soon as we exclude <Source>.*\\vc\\tools\\msvc\\.*</Source>, a bunch of errors are gone, but still too many left. Notice that in previous versions of Visual Studio those files were excluded by <Source>.*\\vctools\\.*</Source> which is the default configuration by Microsoft. In the latest versions of Visual Studio, Microsoft moved them to vc\tools\msvc\.

  3. Even only including our own namespace in the code coverage analysis won’t work. We still get the line is out of range exception.

  4. Removing C++ 14 language features fixed some issues.

  5. <SupportJustMyCode>false</SupportJustMyCode> fixed some issues, see 411331@Developer Community.