开发者

Using release code for code coverage

Is there any chance I'll run into trouble checking coverage with release code in .Net? (I.E. Methods inlining or开发者_开发问答 similar compiler magic?)


The unit of code used by code coverage tools (both NCover and VSTS), is the sequence point found in PDB (the dark red section of code highlighted when you put a break point at debug time).

Thus if you don't have your PDB files generated you won't have code coverage metrics. To answer your question, you can do have code coverage metrics on Release mode as long as you generate PDB files (didn't test it myself but I thing it is 95% sure)

You won't have problem with things like Compiler inline that happens during IL -> asm compilation at runtime, performed by the CLR Just in Time compiler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜