Bug 42739 - Web Inspector: should detect JS files/functions/lines which haven't been executed
Summary: Web Inspector: should detect JS files/functions/lines which haven't been exec...
Status: RESOLVED DUPLICATE of bug 138454
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 03:35 PDT by ekamenskaya
Modified: 2014-12-16 00:29 PST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ekamenskaya 2010-07-21 03:35:00 PDT
In Scripts panel there should be button (or option in context menu, or keyboard shortcut) which allows to somehow highlight all functions or lines of code which haven’t been executed. 

Would be great if it worked not as in Page Speed (which shows all functions not executed on page onload), but as in JsCoverage http://siliconforks.com/jscoverage/ (which also makes measurement after page onload; for example, if you press a button on a page and some JS code is executed, it will be displayed as executed by the tool).

After unused functions/lines of javascript are shown, user can delete them using editing functionality in Scripts panel. 
This may be extremely useful when website contains huge js files, and you want to debug it. Typically by this way you can impressively reduce JS in size and make it more visible and clear for further debugging.
Comment 1 Brian Burg 2014-12-16 00:29:28 PST

*** This bug has been marked as a duplicate of bug 138454 ***