Can I get chrome-devtools to actually search all JS sources?

JavascriptGoogle Chrome-Devtools

Javascript Problem Overview


I'm having trouble with searching through JS files in chrome dev-tools, in the past the search activated by Ctrl+Shift+F always found what I wanted, but recently (I'm not sure exactly which update triggered this) I'm finding the search does not catch

  • JS in inline script tags

  • JS inside iframes.

I've also found the callstack messed up when inline scripts were involved, but when I try to google for these issues, I just get the dev-tools doc pages, has anyone else noticed these issues? Was I just imagining this worked before?

Javascript Solutions


Solution 1 - Javascript

Yeah, if you want to search within content sources which are scripts used by extensions and the internal browser API, you enable it in the Settings of DevTools and then from any panel in DevTools you can type Ctrl + Shift + F or (on Mac) Options + Command + F (⌥⌘F) to search across all sources, snippets, and files.

Even more helpful to what you may be needing is to set up a Workspace in Settings cog which you can map to a local directory of files which will be available in the Sources file browser sidebar which will also be searchable with the above shortcut.

Solution 2 - Javascript

There is an option under Settings -> Preferences -> Sources called "Search in anonymous and content scripts".

I'm not sure how/when I disabled this but enabling it and restarting chrome has fixed all of my problems.

Solution 3 - Javascript

Latest version of DevTools

Click on the triple dot icon on the right of DevTool dock, and choose Search.

Or just hit: Control-Shift-F while using DevTools (Control-Shift-I).

DevTools Dock menu


Older version of DevTools

Activate 'Search in content scripts' option in DevTools General Settings. It will allow content scripts to be searchable.

Then in DevTools panel you can search the source files at the bottom of the panel.

For example:

Google Chrome - Content scripts - Search in sources


If you don't have the Search tab in bottom of DevTools panel, click on the triple dot icon to open it.

Chrome/Chromium - DevTools Search in source code files

Solution 4 - Javascript

I was facing same issue CTRL+SHIFT+F wasn't working anymore.

  1. Press f12 to open developer tools
  2. Click on vertical ellipsis on the right side of developer toolbar to open its options
  3. Click "More Tools"
  4. Click on "Search"

enter image description here

Solution 5 - Javascript

In the latest version CTRL+SHIFT+F doesn't work anymore even after enabling "Search in anonymous and content scripts".

Steps

  1. You need to click on the three edits either at the top right or the bottom left of the dev tools. enter image description here

  2. You will see an option of search which is what you want.

  3. Also the search tab is present at the bottom.So it might not be visible so you might have to drag the tab up. enter image description here

Solution 6 - Javascript

In case it still doesn't work, check if this extension is installed in your chrome :

form filler: https://chrome.google.com/webstore/detail/form-filler/bnjjngeaknajbdcgpfkgnonkmififhfo?hl=en

CTRL+SHIFT+F was still not working for me but then I discovered that chrome extension "Form Filler" was overriding the "search all" in console command

To change this : go to url --> chrome://extensions/

then go to the bottom right : Keyboard shortcuts and you can change + CTRL+SHIFT+F command for form filler

then the command CTRL+SHIFT+F in chrome search console worked again

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
QuestionFrances McMullinView Question on Stackoverflow
Solution 1 - JavascriptjaredwilliView Answer on Stackoverflow
Solution 2 - JavascriptFrances McMullinView Answer on Stackoverflow
Solution 3 - JavascriptkenorbView Answer on Stackoverflow
Solution 4 - JavascriptPatrick SView Answer on Stackoverflow
Solution 5 - JavascriptAchal GuptaView Answer on Stackoverflow
Solution 6 - JavascriptXavaveView Answer on Stackoverflow