captainbrosset/devtools-tips

Unused JS code detection in Safari

Closed this issue · 2 comments

Safari does have a neat way to show unused JS code in the Sources panel. It basically fades the unexecuted parts of the code. I had covered this in canidev.tools/find-unused-javascript/safari.

find-unused-javascript-safari_u9jd83

Thanks Pankaj. Very useful as always!
From CIDT, I see that you only need to click the C icon. So, no need to start coverage instrumentation from any other tool, right?

Yes correct. Click the "C" icon > Reload the page to fade unexecuted code. Here is a complete demo:

find-unused-js-safari.mp4