DevTools/Hacking: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 39: Line 39:
   $ ./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:
Note that whenever you pull the latest changes from <tt>fx-team</tt> into your local repository, you may need to "clobber". A "clobber" is similar to a "<tt>make clean</tt>". 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 clobber
Line 46: Line 46:
== Enabling DevTools Logging ==
== 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.
Depending on what you are working on, you may want to make some changes to your profile to enable more logging. If you type  '''<tt>about:config</tt>''' in the URL bar, click through the warning page, and search for '''<tt>devtools</tt>''' you can see some of them.


   # Add the global "dump" function to all windows which outputs strings to stdout.
   # Add the global "dump" function to all windows which outputs strings to stdout.
Line 65: Line 65:
If you read through the source code about something you do not know about, you may find documentation here:
If you read through the source code about something you do not know about, you may find documentation here:


* [http://developer.mozilla.org/ Mozilla Developer Network] has a ton of info about XUL elements, HTML, JS, DOM, Gecko-specific APIs and more.
* [http://developer.mozilla.org/ Mozilla Developer Network] has a ton of info about XUL elements, HTML, JS, DOM, Web APIs, Gecko-specific APIs, and more.
* [http://mxr.mozilla.org/mozilla-central/ MXR (Mozilla Cross-Reference)] is a source code search engine - search for symbols you want to learn about, eg. nsIDocument.
* [http://dxr.mozilla.org/mozilla-central/source/ DXR] is a source code search engine - search for symbols you want to learn about, eg. nsIDocument.
* [http://dxr.mozilla.org DXR] is a smart source code search tool, similar to MXR but sometimes better.
* You should read our [[DevTools/CodingStandards|Coding Standards]] before writing code.
* You should read our [[DevTools/CodingStandards|Coding Standards]] before writing a patch.
** In general, try to be File Consistent. For new files, follow the standards.
** in general, try to be File Consistent. For new files, follow the standards.


If you still have questions, [[DevTools/GetInvolved#Communication|ask us on IRC]] or leave a comment on the Bugzilla case.
We recommend [https://support.mozilla.org/en-US/kb/how-search-from-address-bar adding a smart keyword search] for DXR and MDN.


And finally, once you have a patch file you can simply add it as an attachment to the Bugzilla case you are working on. You can read more about [https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch how to submit a patch] if you want more information.
If you still have questions, [[DevTools/GetInvolved#Communication|ask us on IRC]] or leave a comment on the Bugzilla ticket.
 
Once you have a patch file, add it as an attachment to the Bugzilla ticket you are working on and add the '''feedback?''' or '''review?''' flag depending on if you just want feedback and confirmation you're doing the right thing or if you think the patch is ready to land respectively. Read more about [https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch how to submit a patch and the Bugzilla review cycle here].


= Developer Tools Directories Overview =
= Developer Tools Directories Overview =
Confirmed users
125

edits