DevTools/GetInvolved: Difference between revisions

Add information about running the browser as changes are made
No edit summary
(Add information about running the browser as changes are made)
Line 54: Line 54:


Which is much faster and should only take a few seconds.
Which is much faster and should only take a few seconds.
=== Running your build ===
==== First Run ====
Once you have built Firefox, you can run it with
 
  $ ./mach run -p development
What is the <code>-p development</code>?  It is a flag telling Firefox to use a different [https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data profile], named "development" (this name can be anything you want).  If it does not exist the first time you run it, Firefox will open a popup and you can create a new profile with the name you passed in.  This will prevent you from seeing an error message telling you that you need to close your main browser window, and it will let you make settings changes without worrying about messing up your normal profile.
Once this command runs, you should see a new Firefox window, called "Nightly".  You may want to make a couple quick changes to the profile.  So type '''about:config''' in the URL bar, click through the warning page, and search for '''devtools'''.
The following two settings allow you to use the [https://developer.mozilla.org/en-US/docs/Debugging_JavaScript browser debugger] to set breakpoints inside of the devtools code, and let you run the Scratchpad in the ''Browser'' environment:
  * '''devtools.chrome.enabled''' = true
  * '''devtools.debugger.remote-enabled''' = true
This setting prints all packets sent over the remote debugging protocol to stdout:
  * '''devtools.debugger.log''' = true
Restart the browser to apply any configuration changes.
==== Development workflow ====
As you make changes to the code, you can run the following commands to see your changes (you may want to store these in a script for reuse).
  $ ./mach build toolkit/devtools browser
  $ ./mach run -p development


=== Resources ===
=== Resources ===
Confirmed users
66

edits