[Question] Instrumenting inline functions for code coverage
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Hi,
I'm working on a code coverage tool and we are facing issues when calculating coverage for `inline` functions.
We instrument the code on IL level and the `inline function calls` are also instrumented in that way.
The function calls are instrumented properly but due to the fact that the compiler inlines the function body
instead of calling the function, the code is never hit by our coverage tool (because the function is never called).
What we would need is a mapping of the functions sequence points to the location where the function body is inlined.
Thus we could add our intrumentation / tracker to the right location in the assemblies IL.
Any idea how we could do this?
(this is the corresponding issue in our repo: [https://github.com/coverlet-coverage/coverlet/issues/1225](https://github.com/coverlet-coverage/coverlet/issues/1225))
Contributor guide
Assessment
This issue has not been assessed yet.