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

David McMullin picture David McMullin · Apr 11, 2013 · Viewed 86.9k times · Source

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?

Answer

jaredwilli picture jaredwilli · Jun 24, 2013

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.