Confirmed users
125
edits
No edit summary |
|||
Line 12: | Line 12: | ||
For your first build, running <code>./mach build</code> should do the trick after you get the source code. If you are going to be building a lot, you may want to set up your [https://developer.mozilla.org/en-US/docs/Configuring_Build_Options .mozconfig file]. | For your first build, running <code>./mach build</code> should do the trick after you get the source code. If you are going to be building a lot, you may want to set up your [https://developer.mozilla.org/en-US/docs/Configuring_Build_Options .mozconfig file]. | ||
== First Run == | == First Run == | ||
Line 35: | Line 25: | ||
Open DevTools, and click the "Toolbox Options" gear in the top left. Make sure the following two options are checked: '''Enable Chrome Debugging''' and '''Enable Remote Debugging'''. These settings allow you to use the [https://developer.mozilla.org/en-US/docs/Debugging_JavaScript#JavaScript_Debugger browser debugger] to set breakpoints inside of the DevTools code, and let you run the [https://developer.mozilla.org/en-US/docs/Tools/Scratchpad Scratchpad] in the ''Browser'' environment. | Open DevTools, and click the "Toolbox Options" gear in the top left. Make sure the following two options are checked: '''Enable Chrome Debugging''' and '''Enable Remote Debugging'''. These settings allow you to use the [https://developer.mozilla.org/en-US/docs/Debugging_JavaScript#JavaScript_Debugger browser debugger] to set breakpoints inside of the DevTools code, and let you run the [https://developer.mozilla.org/en-US/docs/Tools/Scratchpad Scratchpad] in the ''Browser'' environment. | ||
[[Image:DevToolsDeveloperSettings.png|center|600px|Settings for developer tools - "Enable Chrome Debugging" and "Enable Remote Debugging"]] | [[Image:DevToolsDeveloperSettings.png|center|600px|Settings for developer tools - "Enable Chrome Debugging" and "Enable Remote Debugging"]] | ||
= Development workflow = | |||
== Incremental Builds == | |||
Once you've already built Firefox once, and you just want to incrementally update your build with your latest devtools changes, you can run: | |||
$ ./mach build toolkit/devtools browser | |||
Which is much faster than your first build or clobber builds and should only take a few seconds. You can run your build the same way you did before: | |||
$ ./mach run -p development | $ ./mach run -p development | ||
Note that whenever you pull the latest changes from `fx-team` into your local repository, you may need to "clobber". A "clobber" is similar to "make clean". You'll know you need to clobber when you get a big error message telling you to do a clobber build after you tried to do an incremental build. To do a clobber build, enter these commands: | |||
$ ./mach clobber | |||
$ ./mach build | |||
== Enabling DevTools Logging == | |||
Depending on what you are working on, you may want to make some changes to your profile to enable more logging. If you type '''about:config''' in the URL bar, click through the warning page, and search for '''devtools''' you can see some of them. | |||
# Add the global "dump" function to all windows which outputs strings to stdout. | |||
'''browser.dom.window.dump.enabled''' = true | |||
# Dumps all packets sent over the remote debugging protocol to stdout (requires browser.dom.window.dump.enabled): | |||
'''devtools.debugger.log''' = true | |||
# Log every event notification from the EventEmitter class (toolkit/devtools/event-emitter.js) (requires browser.dom.window.dump.enabled) | |||
'''devtools.dump.emit''' = true | |||
Restart the browser to apply configuration changes. | |||
= Making and Submitting a Patch = | = Making and Submitting a Patch = |