Hello.
My first post here. I'm looking for advice on debugging an issue with the
v8 code coverage.
I'm using startPreciseCoverage / takePreciseCoverage to extract code
coverage data from Chrome (i.e. v8).
My issue: data from uncovered functions are missing from the dumped data.
For example, assume the handleSubmit function in authors.js is not called.
I expect to see this:
{
"scriptId": "16",
"url":
"file:///home/<user>/v8-chrome-coverage-wdio-sync/public/js/authors.js",
"functions": [
{
"functionName": "",
"ranges": [{ "startOffset": 0, "endOffset": 828, "count": 1 }],
"isBlockCoverage": true },
{
"functionName": "showContent",
"ranges": [{ "startOffset": 71, "endOffset": 448, "count": 1 }],
"isBlockCoverage": true
},
{
"functionName": "",
"ranges": [{ "startOffset": 274, "endOffset": 444, "count": 3
}],
"isBlockCoverage": true
},
{
"functionName": "handleSubmit",
"ranges": [{ "startOffset": 450, "endOffset": 703, "count": 0
}],
"isBlockCoverage": false
}
]
},
but instead I get this:
{
"scriptId": "16",
"url":
"file:///home/<user>/v8-chrome-coverage-wdio-sync/public/js/authors.js",
"functions": [
{
"functionName": "",
"ranges": [{ "startOffset": 0, "endOffset": 828, "count": 1 }],
"isBlockCoverage": true },
{
"functionName": "showContent",
"ranges": [{ "startOffset": 71, "endOffset": 448, "count": 1 }],
"isBlockCoverage": true
},
{
"functionName": "",
"ranges": [{ "startOffset": 274, "endOffset": 444, "count": 3
}],
"isBlockCoverage": true
}
]
},
i.e. there is no data at all on the uncovered function. This causes the c8
report tool to generate an invalid report.
The above is what I observe on my company's codebase. I tried to create
simple reproductions that I could share, however all my simple projects are
working fine.
Any suggestions or tips on what I could try to debug the problem would be
appreciated.
(FYI ... here's a working version of the flow on a smaller project:
https://github.com/cek333/v8-chrome-coverage-wdio-sync)
Thanks.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/v8-dev/22d16033-590f-4de3-86de-a6aa6ebcbb74n%40googlegroups.com.