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:
The following screenshots are from a single search in Firebug:
Open a new Search pane in Developer Tools by:
- pressing Ctrl+Shift+F (Cmd+Option+I on mac)
- clicking the overflow menu (⋮) in DevTools,
- clicking the overflow menu in the Console (⋮) and choosing the Search option
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.
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:
In addition to Ctrl+Shift+F (Cmd+Option+F on Mac) as suggested in this answer, you can right click on the top tree node in the sources tab and select "Search in All Files":
In Windows Control+Shift+F. Also make sure to search in content scripts as well. Go to Settings->Sources-> Search in anonymous and content script.
Your text may be located in the networking response.There is also a search tool in the Network tab, and you may try it.
What you want to search for may stay either in DOM or in memory. If it is not in DOM, well, it may be in memory, because you have just see it in your computer screen anyway. The text you search for may be loaded either from scripts in the initial DOM or from response in the later request.
来源:https://stackoverflow.com/questions/4145266/how-to-search-all-loaded-scripts-in-chrome-developer-tools