google-chromegoogle-chrome-devtoolsscript-debugging

How to search all loaded scripts in Chrome Developer Tools?


In Firebug, you can search some text and it will look for it in all scripts loaded on a page. Can the same be done in Chrome Developer tools while debugging client script? I tried it, but it seems to search only in the script I have open, and not the rest that are on the page.

I hope the next screenshots give a better idea about what I'm trying to accomplish: alt text

The following screenshots are from a single search in Firebug: alt text alt text


Solution

  • Open a new Search pane in Developer Tools by:

    You can search across all your scripts with support for regular expressions and case sensitivity.

    Click any match to load that file/section in the scripts panel.

    Search all files - results

    Make sure 'Search in anonymous and content scripts' is checked in the DevTools Preferences (F1). This will return results from within iframes and HTML inline scripts:

    Search in anonymous and content scripts DevTools Settings Preferences