Chrome Devtools Coverage: how to save or capture code used code?

后端 未结 8 1076
抹茶落季
抹茶落季 2020-12-14 05:50

The Coverage tool is good at finding used and unused code. However, there doesn\'t appear to be a way to save or export only the used code. Even hiding unused code would b

8条回答
  •  醉话见心
    2020-12-14 06:19

    Chrome canary 73 can do it. You will need Windows or Mac OS. There is an export function (Down arrow icon) next to the record and clear buttons. You'll get a json file and then you can use that to programmatically remove the unused lines.

提交回复
热议问题