Welcome to Searchfox
Searchfox is a source code indexing tool for Mozilla Firefox. It indexes C++, Rust, and JavaScript code. This is the help page for Searchfox. You can contribute to Searchfox! Visit our GitHub page. Please send bug reports to Bugzilla.
Query Language
Searchfox supports both text and file path searches.
Queries entered into the search box use exact string matching. No search operators are supported. Case insensitive matching and regular expression matching can be requested with the check boxes.
Path filtering uses globbing. A path matches even if only a substring
of the path is matched by the glob. Use the ^
and $
operators to match the beginning or end of the
path. Here are some examples:
test
- Find all paths containing the substring "
test
". ^js/src
- Find all paths starting with
js/src
. *.cpp
- Find all paths containing "
.cpp
". *.cpp$
- Find all paths ending with "
.cpp
". ^js/src/*.cpp$
- Find all C++ files in
js/src
, but not in subdirectories (i.e.,*
does not match/
). ^js/src/**.cpp$
- Find all C++ files in
js/src
or in subdirectories (i.e.,**
matches/
). ^js/src/**.{cpp,h}$
- Find all C++ source or header files in
js/src
or in subdirectories.
Repositories indexed
Cross-referencing
Once you have arrived at a file, you can mouse over identifiers. If the color of the identifier changes, then clicking on the identifier will open a context menu for cross-referencing identifiers.
reviveCrashedTab
” and
clicking. A context menu will open and you can choose to search for all references to the symbol
(definitions, assignments, and uses).
In JavaScript code, a second option is sometimes offered. Try mousing
over the same identifier in the following:
“SessionStore.reviveCrashedTab
”.
In this case, you're given the opportunity to search for
SessionStore.reviveCrashedTab
(and not
SessionStoreInternal.reviveCrashedTab
). Also, since there is only one definition of
SessionStore.reviveCrashedTab
, you can jump directly to it.
In some cases there is ambiguity whether to search for C++ or JavaScript implementations of an XPCOM method. Searching for the method from C++ or JavaScript will find the same-language implementations of that method as well as the IDL declaration. Visiting the IDL declaration and searching from there will yield all implementations.