--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1106,16 +1106,18 @@ class RunProgram(MachCommandBase):
@CommandArgument('--remote', '-r', action='store_true', group=prog_group,
help='Do not pass the --no-remote argument by default.')
@CommandArgument('--background', '-b', action='store_true', group=prog_group,
help='Do not pass the --foreground argument by default on Mac.')
@CommandArgument('--noprofile', '-n', action='store_true', group=prog_group,
help='Do not pass the --profile argument by default.')
@CommandArgument('--disable-e10s', action='store_true', group=prog_group,
help='Run the program with electrolysis disabled.')
+ @CommandArgument('--enable-crash-reporter', action='store_true', group=prog_group,
+ help='Run the program with the crash reporter enabled.')
@CommandArgumentGroup('debugging')
@CommandArgument('--debug', action='store_true', group='debugging',
help='Enable the debugger. Not specifying a --debugger option will result in the default debugger being used.')
@CommandArgument('--debugger', default=None, type=str, group='debugging',
help='Name of debugger to use.')
@CommandArgument('--debugparams', default=None, metavar='params', type=str,
group='debugging',
@@ -1132,18 +1134,19 @@ class RunProgram(MachCommandBase):
@CommandArgument('--dmd', action='store_true', group='DMD',
help='Enable DMD. The following arguments have no effect without this.')
@CommandArgument('--mode', choices=['live', 'dark-matter', 'cumulative', 'scan'], group='DMD',
help='Profiling mode. The default is \'dark-matter\'.')
@CommandArgument('--stacks', choices=['partial', 'full'], group='DMD',
help='Allocation stack trace coverage. The default is \'partial\'.')
@CommandArgument('--show-dump-stats', action='store_true', group='DMD',
help='Show stats when doing dumps.')
- def run(self, params, remote, background, noprofile, disable_e10s, debug,
- debugger, debugparams, slowscript, dmd, mode, stacks, show_dump_stats):
+ def run(self, params, remote, background, noprofile, disable_e10s,
+ enable_crash_reporter, debug, debugger, debugparams, slowscript,
+ dmd, mode, stacks, show_dump_stats):
if conditions.is_android(self):
# Running Firefox for Android is completely different
if dmd:
print("DMD is not supported for Firefox for Android")
return 1
from mozrunner.devices.android_device import verify_android_device, run_firefox_for_android
if not (debug or debugger or debugparams):
@@ -1177,17 +1180,21 @@ class RunProgram(MachCommandBase):
all(p not in params for p in ['-profile', '--profile', '-P'])
if no_profile_option_given and not noprofile:
path = os.path.join(self.topobjdir, 'tmp', 'scratch_user')
if not os.path.isdir(path):
os.makedirs(path)
args.append('-profile')
args.append(path)
- extra_env = {'MOZ_CRASHREPORTER_DISABLE': '1'}
+ extra_env = {}
+
+ if not enable_crash_reporter:
+ extra_env['MOZ_CRASHREPORTER_DISABLE'] = '1'
+
if disable_e10s:
extra_env['MOZ_FORCE_DISABLE_E10S'] = '1'
if debug or debugger or debugparams:
if 'INSIDE_EMACS' in os.environ:
self.log_manager.terminal_handler.setLevel(logging.WARNING)
import mozdebug