DOM/Engineering: Difference between revisions

logging details, mainly
mNo edit summary
(logging details, mainly)
Line 4: Line 4:


Please feel free to edit to make the document more usable.  
Please feel free to edit to make the document more usable.  
== Building Firefox ==
=== Making Builds Go Faster ===
* You can [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_Icecream use Icecream] to distribute builds to other machines on whatever network you're using.  [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_Icecream#Running_a_scheduler Each Mozilla office has its own build server you can use].  If you work remotely, you can also see massive speed-ups from adding a second comparable machine.
* You can [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_Icecream#Using_ccache use ccache in conjunction with ice cream].  ccache caches deterministic build results which is useful when the only thing that has changed for a file are the timestamps of its dependencies.


== Spec-Work ==
== Spec-Work ==
Line 38: Line 45:
* null pointer crashes should be fixed but don't need the whole process.
* null pointer crashes should be fixed but don't need the whole process.


=== Using crash-stats ===
=== Using crash-stats.mozilla.org and crash reports ===
* Investigating
There's a variety of information on how to understand a crash report:
* [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Crash_reporting/Understanding_crash_reports MDN's Understanding Crash Reports Page]
 
You can also be granted privileges after agreeing to privacy guidelines in order to download Windows-style "minidump" files created by breakpad that contain more details than can be found on the public crash report page.  The information includes details like the contents of stack memory (which may include data that has privacy implications, hence the privacy agreement).
* [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Crash_reporting/Understanding_crash_reports MDN's Debugging a minidump page]
 
== Debugging ==
General links:
* [https://developer.mozilla.org/en-US/docs/Mozilla/Debugging MDN Debugging Page]
 
=== Remote Debugging of Firefox ===
Firefox's local debugging APIs can also be accessed remotely.  This can be useful for debugging mobile versions of Firefox.
 
=== Logging ===
 
==== MOZ_LOG ====
Improving upon the prior NSPR logging mechanism exposed via NSPR_LOG_MODULES, C++ code can perform conditional logging at a granular per-"module" basis using MOZ_LOG that can be enabled several ways:
* When launching Firefox via the MOZ_LOG environment variable without output going to stdout by default, or a file if MOZ_LOG_FILE is specified.
** ex: MOZ_LOG=IndexedDB:5 enables verbose IndexedDB logging.
* While Firefox is running via the [https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging about:networking page].
* Using preferences by modifying the preferences file when Firefox is not running, or at runtime using "about:config".
** An int pref "logging.IndexedDB" with a value of 5 enables verbose IndexedDB logging.
** A string pref "logging.IndexedDB" with a value of "verbose" enables verbose IndexedDB logging.  Valid values are "error", "warning", "info", "debug", and "verbose" in order of increasing detail/spamminess.
 
More info:
* [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging MDN's Gecko Logging] page covers [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging#Declaring_a_log_module how to use the logging mechanism in your code] and [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging#Enabling_Logging how to enable it].
* [https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging MDN's HTTP Logging] page documents the about:networking page that makes it possible to enable and configure


== Performance / Validation ==
== Performance / Validation ==


=== Telemetry ===
=== Telemetry ===
Confirmed users
360

edits