Changes

Jump to: navigation, search

Mobile/Fennec/Android/GDB

3,362 bytes added, 20:36, 20 March 2013
FenInit
This is the default option. Once you choose an object directory to use, the script will automatically launch Fennec, and run GDBServer to attach to Fennec.
The script tries to scan your user directory for object directories. For more control, see the "[[#feninit.default.objdir|Configuration" section below ]] on how to specify default object directories or where to scan for object directories.
=== Debug Fennec with env vars and args ===
This option gives you the additional ability to specify environment variables and arguments when launching Fennec. See the [[#feninit.default.env|Configuration section]] on how to specify additional default environment variables and arguments.
=== Debug using jdb ===
This option will let you debug a C++ test. Environment variables and arguments are supported.
 
=== Configuration ===
==== feninit.default.objdir ====
* Set feninit.default.objdir to the default object directory. Note that once it is set, the script will not prompt you to choose an object directory.
* Alternatively, if your object directories are called 'obj*' under your source directory, you can set feninit.default.objdir to the source directory itself. The script will scan the source directory and list all the object directories that it found.
* Note that there have been problems in the past with using ~ and $HOME in the setting, so use absolute path for best results.
==== feninit.default.srcroot ====
* Unlike the previous setting, feninit.default.srcroot specifies the directory containing all the source directories. This is convenient if you have 'src/mozilla-central', 'src/mozilla-inbound', 'src/mozilla-aurora', etc. In that case, you can set feninit.default.srcroot to 'src' and all the source directories will be scanned for object directories.
* Again, use absolute path for best results.
==== feninit.default.no_launch ====
* This settings is meant for B2G, and may not be useful for Fennec debugging.
==== feninit.default.gdbserver_port ====
* To debug Fennec on your device, GDB on your computer needs to talk to GDBServer on your device through a TCP port forwarded to your device through ADB.
* Normally, JimDB will use a random port. However, you can pick a specific port to use. This is useful in certain situations such as inside an SSH session. See [http://www.jnchen.com/blog/2012/11/tunnelling-adb this blog post].
==== feninit.default.jdwp_port ====
* Similar to feninit.default.gdbserver_port, except for using JDB for debugging.
==== feninit.default.env ====
* Specify the default environment variables to use when launching Fennec. Only used for the "Debug Fennec" options.
==== feninit.default.args ====
* Specify the default arguments to use when launching Fennec. Only used for the "Debug Fennec" options.
==== feninit.default.cpp_env ====
* Similar to [[#feninit.default.env|feninit.default.env]], except only used for the "Debug compiled-code unit test" option.
==== feninit.default.mochi_env ====
* Similar to [[#feninit.default.env|feninit.default.env]], except only used for the "Debug content Mochitest" option.
==== feninit.default.mochi_args ====
* Specify the default arguments to use when debugging Mochitest. Only used for the "Debug content Mochitest" option.
* Note that Mochitest arguments are arguments to the test harness (e.g. --remote-webserver), and not arguments to Fennec itself.
==== feninit.default.mochi_xre ====
* Specify the XRE directory to use, instead of letting the script download and manage an XRE copy.
==== feninit.default.mochi_harness ====
* Specify the directory containing the harness itself, i.e. "runtestsremote.py". Not needed normally.
==== feninit.default.mochi_xre_url ====
* Specify the directory on [http://ftp.mozilla.org ftp.mozilla.org] to use for downloading XRE. Not used if feninit.default.mochi_xre is specified.
==== feninit.default.mochi_xre_update ====
* Specify the XRE check for updates interval. Only used if the script is managing the XRE copy, and not used if feninit.default.mochi_xre_update is specified.
= FAQ =
Confirm
507
edits

Navigation menu