Visual Studio 2010 Native C++ Code Coverage Coloring Not Working

让人想犯罪 __ 提交于 2020-01-04 15:53:49

问题


I was using Visual Studio 2010 ultimate edition without any service pack to do code coverage test for my native c++ project but Code Coverage Coloring seems not working for me. Are my steps correct?

1) I used the two command line tools vsinstr.exe and vsperfmon.exe to perform instrumentation and code coverage collection on a separate machine without my project directory/source code. I just copied my compiled native .exe file to there. The reason I need to use a separate machine is that my VS2010 is installed in a virtual machine (virtual box) and code coverage seems not working under a virtual machine.

2) I instrumented the exe/run the test (as decribed by the 2 links below) and ended up having a .coverage file, and 2 instrumented .exe/.pdb files. Then I copied these 3 files back to my full VS2010 ultimate machine (under virtual box)with my project directory and source codes.

http://blogs.msdn.com/b/phuene/archive/2007/05/14/code-coverage-collection.aspx http://blogs.msdn.com/b/phuene/archive/2007/05/03/code-coverage-instrumentation.aspx

3) I opened the .coverage file and the result can be read in the Code Coverage Results windows and the Go To Source Code feature was working except that the C++ source code located by it was not colored (I have selected the Show Code Coverage Coloring button).

How do I enable code coverage coloring for native C++ project?


回答1:


Probably a bug in VS2010 that is fixed after installing SP1



来源:https://stackoverflow.com/questions/15134644/visual-studio-2010-native-c-code-coverage-coloring-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!