Firefox Source Docs Logo

Getting Started

  • Getting Set Up To Work On The Firefox Codebase

Working On Firefox

  • Working on Firefox
  • Bug Handling

Firefox User Guide

  • Firefox DevTools User Docs

Source Code Documentation

  • Firefox
  • DOM
  • Editor
  • Layout & CSS
  • Graphics
  • Processes, Threads and IPC
  • Firefox DevTools Contributor Docs
  • Toolkit
  • SpiderMonkey
  • Welcome to GeckoView’s documentation!
  • WebIDL
  • libpref
  • Networking
  • Remote Protocols
  • Services
  • File Handling
  • Firefox on macOS
  • Accessibility
  • Code quality
  • Writing Rust Code
  • Gecko Profiler
  • Performance
  • XPCOM
  • Network Security Services (NSS)

The Firefox Build System

  • Mach
  • Pushing to Try
  • Build System
  • TaskCluster Task-Graph Generation
  • Managing Documentation

Testing & Test Infrastructure

  • Testing Policy
  • Configuration Changes
  • Marionette
  • geckodriver
  • XPCShell tests
  • GTest
  • Fuzzing
  • Sanitizer
  • Performance Testing
  • Code coverage
  • Testing & Debugging Rust Code

Localization & Internationalization

  • Internationalization
  • Localization

Firefox and Python

  • mozbase
  • Using third-party Python packages

Metrics Collected in Firefox

  • Metrics
Firefox Source Docs
  • »
  • Search
  • View page source

Search¶

Searching for files¶

To search for a particular file, press Control + P (or Command + P on a Mac) and type the search term. The source pane will display a list of all matching files as you type. You can use the up and down arrows to move through the list, and Return to open the file you want:



Searching within a file¶

To search for a particular substring in the file currently loaded into the source pane, press Control + F (or Command + F on a Mac) while the source pane is focused. Press Return to search. The debugger will display the number of matches in the code and highlight each result:

../../../../_images/search_code.png

Using the Outline tab¶

If you are searching for a specific function within the current JavaScript file, you can use the Outline tab in the debugger to find it quickly. The Outline tab lists the functions in the current file. The default sort order is by the order in the file but you can simplify the search by click on “Sort by name” at the bottom of the tab.

../../../../_images/outline_sorted.png

You can further simplify the search by filtering the list. Enter text into the text input above the list to limit the results in the Outline. For example, if I enter “load” when viewing the above list, I get the following:

../../../../_images/outline_filtered.png

Only the functions with load in their name are shown.

This feature may not seem terribly useful when searching a file with a handful of functions in it but when you are searching through a file with dozens of functions, it comes in handy.

Searching in all files¶

You can also search for a string in all of the files included in the currently opened project. Press Shift + Ctrl + F (Windows and Linux) or Shift + Cmd + F (macOS) and then enter the string you are trying to find.

../../../../_images/searchinallfiles.png

If the string exists in any of the files in the project, the search will return a list showing a list by file and line number.

../../../../_images/ctrlshiftf.png

Click on any entry in the list to go directly to the line in the file where the string occurs.


Built with Sphinx using a theme provided by Read the Docs.