3 For other debugging resources, see also: Remote project [wiki]
5 ## Increasing the logging verbosity
7 To increase the internal logging verbosity you can use the
8 `remote.log.level` [preference].
10 If you use mach to start Firefox:
13 % ./mach run --setpref "remote.log.level=Trace" --remote-debugging-port
16 By default, long log lines are truncated. To print long lines in full, you
17 can set `remote.log.truncate` to false.
19 ## Enabling logging of emitted events
21 To dump events produced by EventEmitter,
22 including CDP events produced by the Remote Agent,
23 you can use the `toolkit.dump.emit` [preference]:
26 % ./mach run --setpref "toolkit.dump.emit=true" --remote-debugging-port
29 ## Logging observer notifications
31 Observer notifications are used extensively throughout the
32 code and it can sometimes be useful to log these to see what is
33 available and when they are fired.
35 The `MOZ_LOG` environment variable controls the C++ logs and takes
36 the name of the subsystem along with a verbosity setting. See
37 [prlog.h] for more details.
40 MOZ_LOG=ObserverService:5
43 You can optionally redirect logs away from stdout to a file:
46 MOZ_LOG_FILE=service.log
49 This enables `LogLevel::Debug` level information and places all
50 output in the file service.log in your current working directory.
52 [preference]: Prefs.md
53 [prlog.h]: https://searchfox.org/mozilla-central/source/nsprpub/pr/include/prlog.h
54 [wiki]: https://wiki.mozilla.org/Remote/Developer_Resources