How do you load your dll? With LoadLibrary
The first thing to check is that flags --modules
do not skip your dll.
In the log file, you can see skip modules.
Other potential issue is that OpenCppCoverage does not find the pdb file of your dll.
If Visual Studio cannot load the pdb file, it will be the same for OpenCppCoverage.
So, you can perform the following test:
- Debug your executable inside Visual Studio
- Wait that your dll is loaded by your program
- Check in Visual Studio output pane that it loads correctly the pdb file of your dll.
If the previous steps do not help, you can try to run OpenCppCoverage with flag
It will produce extended log. Perhaps you will notice something.
If it is also failed, can you post the log file with flag --verbose
and tell me the name of your dynamic dll?
For your second question, you cannot attach OpenCppCoverage to a running process.
Do you have any use case for this feature?
Hope that help