Code coverage in Visual Studio 2010 for native C++

2019-08-08 23:17发布

问题:

I am using VS 2010.Tried to get code coverage of my C++ exe that uses my few C++ dlls.Expected the coverage report to show the blocks covered in both modules(exe and dlls) but it shows only the blocks covered in exe. Instrumented my exe and all my dlls like ' vsinstr.exe /COVERAGE ' and tried ' VSPerfMon.exe /COVERAGE /OUTPUT:' Followed the steps mentioned in this blog http://blogs.msdn.com/b/cellfish/archive/2008/11/16/native-c-code-coverage-reports-using-visual-studio-2008-team-system.aspx

回答1:

I've missed to put the dependent instrumented dlls into the correct path. After placing those dlls, getting coverage report include both modules(exe and dlls).