This project is read-only.

Execution halt without further hints

Jun 6 at 2:51 AM
Edited Jun 6 at 2:53 AM

By looking at the OpenCppCoverage introduction, I am very excited for its functionality and give it a try immediately.

I use Microsoft Visual Studio Community 2017 to create a simple C++ project OpenCppCovTest which only contains one .cpp file with one main function, I put some condition branches in the main function as a trial.

With the executable and .pdb files, I use below command to start:
OpenCppCoverage.exe --source=
OpenCppCovTest --export_type=html -- OpenCppCovTest.exe

======== log start
D:\codes\opencppcoverage_test\OpenCppCovTest\Debug>OpenCppCoverage.exe --source=
OpenCppCovTest --export_type=html -- OpenCppCovTest.exe
[info] Start Program:
Working directory: not set.
Modules: Selected: * Excluded:
Sources: Selected: OpenCppCovTest Excluded:
Log Level: Normal
Cover Children: 0
Aggregate by file: 1
Continue after C++ exception: 0
Optimized build support: 0
Export: Html
Input coverage:
Unified diff:
Excluded line regular expressions:
[info] Module: D:\codes\opencppcoverage_test\OpenCppCovTest\Debug\OpenCppCovTest.exe is selected because it matches selected pattern: *
======== log end

The console just halt here without further instructions, the only difference I spot is a new file "LastCoverageResults.log" sized 0KB (empty) being created under the working folder (same folder as .exe and .pdb).

The OpenCppCoverage version is (shall be able to cope with VS2017 per the ChangeLog)

Looking forward to your reply :)
Jun 6 at 10:02 PM

I have just created a default console application with the following code:
int main()
    if (true)
        return 0;
        return 0;
When I run OpenCppCoverage (x64) with the following command, I have a new folder in the current folder starting with "CoverageReport-"
OpenCppCoverage --source Console --export_type=html -- Debug\ConsoleApplication1.exe
I have tried with Visual Studio 2017 version 15.2 26430.6 and version 15.2 26430.12 on x64 and x86 for debug and release build (you should use --optimized_build for release build).
In all these cases, I had a correct coverage report.

Can you try to disable your antivirus (if any) and reinstall OpenCppCoverage x64? In C:\Program Files\OpenCppCoverage you should have one folder and 21 files (8 455 540 octets).
Can you also check you can run and debug your program?
Can you try on another computer if the problem still exist?

I hope this will help,

Jun 26 at 4:01 AM
Looks like some of my test environment issue, I was testing the toy project on the company PC.
As I tried exactly the same things on my personal laptop, it works.
Maybe there is some privilege setting on the company PC blocking the opencppcoverage execution and I shall check with IT guys.

Thanks for your help :D
Marked as answer by OpenCppCoverage on 6/28/2017 at 3:24 AM