Skip to content

Instantly share code, notes, and snippets.

@bvenkatr
Last active September 1, 2015 08:51
Show Gist options
  • Save bvenkatr/de3d79ac7e7d5dbb9f04 to your computer and use it in GitHub Desktop.
Save bvenkatr/de3d79ac7e7d5dbb9f04 to your computer and use it in GitHub Desktop.
Chrome Developer Tools: Search or navigate to files, methods or line numbers. Shortcuts for text search and beyond
The ability to quickly find or navigate to specific files, methods or line numbers in an web app can be important in your day to day workflow in the Chrome DevTools. Today we've got some useful tips to help with these when working in the Sources panel.
To search scripts, stylesheets and snippets by filename you can use:
* Ctrl + O (Windows)
* Cmd + O (Mac OSX)
To perform a text search within the current file you can use:
* Ctrl + F (Windows)
* Cmd + F (Mac OSX)
To do a text search across all files you can use:
* Ctrl + Shift + F (Windows)
* Cmd + Opt + F (Max OSX)
If you need to dig down deeper, it's possible to filter for or navigate to a particular JavaScript function/method or CSS rule when viewing a file using:
* Ctrl + Shift + O (Windows)
* Cmd + Shift + O (Mac OSX)
The tools also support going to a specific line-number within the Sources editor. To launch the line number dialog when viewing a file you can use:
* Ctrl + L (Windows)
* CMD + L (Mac OSX)
Some extra notes:
* Cmd/Ctrl + F works across tabs other than Sources such as Resources or Network. If you check the 'filter' option when searching, this will filter down the list of results to only those containing the terms you were looking for.
* You can also switch between tabs using Cmd + [ and Cmd + ]
* If you are editing a script and select some code, you can evaluate it in the console right away using Ctrl + Shift + e
For Source:- https://plus.google.com/+AddyOsmani/posts/e4W2kdrFJY9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment