OpenCppCoverage
OpenCppCoverage copied to clipboard
Not able to generate the report, report has no data
Before creating an issue, please make sure the answer is not in the FAQ.
This template is applied for all bug requests. Remove it for other general question or feature request.
Describe your environment
- Version of OpenCppCoverage: _____0.9.7.0
- Architecture (x86/ x64): ___64
- Windows version: _____ 10
Describe your problem
I am trying to do the POC for code coverage so that just i started with Winrar application...
But it is showing like below image
and getting the below error [info] Coverage generated in Folder C:\Users\user\CoverageReport-2019-02-13-16h13m52s [info] ---------------------------------------------------- [warning] No modules were selected. Please check the values of --modules and --excluded_modules. You can try to remove all --modules and --excluded_modules and use --modules=C:\Windows\SysWOW64 instead.
Hello,
You need PDB files to compute code coverage and so it cannot work with WinRar.exe except if you compiled it. The PDB files are automatically generated by Visual Studio.
I have just added a new section Your first coverage which help you create a coverage report.
I hope it helps,
OpenCppCoverage
I have all .pdb
files... still .cov
files for few projects are only 100 something bytes long and no coverage report is built for these projects.
make sure you are building with the /DEBUG linker and the /Zi compiler flags.
I also noticed that if UNC is involved OpenCPPCoverage has problems to generate the code/modules mappings.
@michalfita : Can you post the log with --verbose flag
?
@prasanna532 请问你的问题解决了吗?我目前也遇到了同样的问题,想请教是怎么解决的。
Is your problem solved? I am currently experiencing the same problem and I would like to ask how to solve it.
Are you building on the same machine as you are running the code with cppcoverage attached?
When building on a different machine i had to create a mapping from the original to the differen source location like: --substitute_pdb_source_path %ORIGINAL_PATH%?%CURRENT_PATH%
(?
acts as a delim between the two specified paths) and --sources %CURRENT_PATH%
ORIGINAL_PATH
is set to the absolute root-path of the folder structure as its located at build time and CURRENT_PATH
is set to the absolute root-path where the actual running binarys are located. The directory layout is, except the beginning which is specified in this mapping, identical.
In this situations i had problems using UNC (\
@prasanna532 是在同一台计算机上构建的。opencppcoverage原本是vs的一种插件,目前在vs中使用是正常的,但是在cmd或者是powershell中使用opnecppcoverage却出现No modules were selected. Please check the values of --modules and --excluded_modules.这样的情况
@prasanna532 @mengfei227 : Please see Coverage report is empty. It helps identifying the issue.
Hi, I have this issue too. I'm working with VS Code 2019 on Parallels, because I have a Mac. Nothing from here helped me.
Hi @donpaul999:
- Did you try running OpenCppCoverage without
--modules
,--excluded_modules
,--sources
and--excluded_sources
? - Did you run OpenCppCoverage with
--verbose
and checked ifLastCoverageResults.log
file contained either[debug] Module: XXXXX.dll is skipped because it matches no selected patterns
or[info] Module: XXXX.dll is selected because it matches selected pattern
? - Did you set a breakpoint in your code and tried to reach it when running your program under a debugger?
OpenCppCoverage