Create a gist now

Instantly share code, notes, and snippets.

@paulrouget / forked from ednapiranha/
Last active Oct 15, 2015

What would you like to do?
Hacking Firefox

More details here:

Hacking Firefox

Get Firefox' source code:

git clone
git checkout fx-team

Install dependencies:

./mach bootstrap
# doesn't work on Windows. See link above.

On osx (not needed for other platforms), create a mozconfig file in the source directory, with the following:

# adding .noindex will make sure spotlight
# won't index the objdir (slow).
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj.firefox.noindex

# Needed for osx 10.9 (fix a font issue):
ac_add_options --with-macos-sdk=/Applications/

Run the following in the dir

./mach build

Wait a while...

./mach run -P dev

Firefox (frontend & devtools) code is located in:


Generate a patch:

In your ~/.gitconfig, add:

  hgp = "show --binary --format=\"# HG changeset patch%n# User %an <%ae>%n%B\" -U8"


git hgp HEAD > myFix.patch
# you can attach this patch to a bugzilla bug

Updated with changes? Run the following

./mach build browser
./mach run -P dev -jsconsole

Running tests for the entire suite

./mach mochitest-devtools browser/devtools

Running tests for a particular patch

./mach mochitest-devtools browser/devtools/path/to/the/test_you_want_to_run.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment