Visual Studio 2010中本机C ++ exe / dll的代码覆盖率 [英] Code coverage in Visual Studio 2010 for native C++ exe/dll

查看:130
本文介绍了Visual Studio 2010中本机C ++ exe / dll的代码覆盖率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2010.试图获取使用我的几个C ++ dll的C ++ exe的代码覆盖率。预期覆盖率报告显示两个模块(exe和dlls)覆盖的块,但仅显示覆盖在可执行程序。检测我的exe和所有dll(例如 vsinstr.exe / COVERAGE)并尝试 VSPerfMon.exe / COVERAGE / OUTPUT:
遵循此博客中提到的步骤 http:// blogs .msdn.com / b / cellfish / archive / 2008/11/16 / native-c-code-coverage-reports-using-visual-studio-2008-team-system.aspx

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

推荐答案

我想将依赖的检测dll放入正确的路径中。放置完这些dll之后,获取覆盖率报告将同时包含两个模块(exe和dll)。

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).

这篇关于Visual Studio 2010中本机C ++ exe / dll的代码覆盖率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆