How to search all loaded scripts in Chrome Developer Tools?

Google ChromeGoogle Chrome-DevtoolsScript Debugging

Google Chrome Problem Overview


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

Google Chrome Solutions


Solution 1 - Google Chrome

Open a new Search pane in Developer Tools by:

  • pressing Ctrl+Shift+F (Cmd+Option+I on mac)
  • clicking the overflow menu () in DevTools, DevTools overflow menu
  • 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.

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

Solution 2 - Google Chrome

Search All Files with Control+Shift+F or Console->[Search tab]

enter image description here

NOTE: Global Search shows up next to the CONSOLE menu

Solution 3 - Google Chrome

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":

enter image description here

Solution 4 - Google Chrome

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.

Solution 5 - Google Chrome

In the latest Chrome as of 10/26/2018, the top-rated answer no longer works, here's how it's done: enter image description here

enter image description here

Solution 6 - Google Chrome

In Widows it is working for me. Control Shift F and then it opens a search window at the bottom. Make sure you expand the bottom area to see the new search window.

enter image description here

Solution 7 - Google Chrome

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSlavoView Question on Stackoverflow
Solution 1 - Google ChromevsevikView Answer on Stackoverflow
Solution 2 - Google ChromeAsherView Answer on Stackoverflow
Solution 3 - Google ChromeBig McLargeHugeView Answer on Stackoverflow
Solution 4 - Google ChromeJDevView Answer on Stackoverflow
Solution 5 - Google ChromeRomanKoustaView Answer on Stackoverflow
Solution 6 - Google ChromeRupesh Kumar TiwariView Answer on Stackoverflow
Solution 7 - Google ChromeIcebergView Answer on Stackoverflow