mono/mono · info

Available options: 'handle-sigint', 'keep-delegates', 'rever

Error message

Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'suspend-on-native-crash', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dont-free-domains', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'gen-seq-points', 'no-compact-seq-points', 'single-imm-size', 'init-stacks', 'casts', 'soft-breakpoints', 'check-pinvoke-callconv', 'use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs', 'native-debugger-break', 'thread-dump-dir=DIR', 'no-verbose-gdb', 'llvm_disable_inlining', 'llvm-disable-self-init', 'llvm-disable-implicit-null-checks', 'weak-memory-model'.

What it means

This is the companion usage message printed immediately after error 142 ('Invalid option for the MONO_DEBUG env variable'). It enumerates every token that mini_parse_debug_option() recognizes as valid. It is not triggered independently — it always follows the invalid-option error as a guidance banner. The list is the authoritative source of valid MONO_DEBUG options for the installed Mono build: it includes handle-sigint, keep-delegates, reverse-pinvoke-exceptions, collect-pagefault-stats, break-on-unverified, gdb, explicit-null-checks, gen-seq-points, and many more. Two undocumented acceptances exist per source comments: 'test-tailcall-require' and the empty string from trailing commas.

Source

Thrown at mono/mini/mini-runtime.c:4094

{
	char *options = g_getenv ("MONO_DEBUG");
	gchar **args, **ptr;

	if (!options)
		return;

	args = g_strsplit (options, ",", -1);
	g_free (options);

	for (ptr = args; ptr && *ptr; ptr++) {
		const char *arg = *ptr;

		if (!mini_parse_debug_option (arg)) {
			fprintf (stderr, "Invalid option for the MONO_DEBUG env variable: %s\n", arg);
			// test-tailcall-require is also accepted but not documented.
			// empty string is also accepted and ignored as a consequence
			// of appending ",foo" without checking for empty.
			fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'suspend-on-native-crash', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dont-free-domains', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'gen-seq-points', 'no-compact-seq-points', 'single-imm-size', 'init-stacks', 'casts', 'soft-breakpoints', 'check-pinvoke-callconv', 'use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs', 'native-debugger-break', 'thread-dump-dir=DIR', 'no-verbose-gdb', 'llvm_disable_inlining', 'llvm-disable-self-init', 'llvm-disable-implicit-null-checks', 'weak-memory-model'.\n");
			exit (1);
		}
	}

	g_strfreev (args);
}

MonoDebugOptions *
mini_get_debug_options (void)
{
	return &mini_debug_options;
}

static gpointer
mini_create_ftnptr (MonoDomain *domain, gpointer addr)
{
#if defined(PPC_USES_FUNCTION_DESCRIPTOR)
	gpointer* desc = NULL;

View on GitHub (pinned to 0f53e9e151)

Solutions

  1. Use the printed list as your reference: choose the correct option name and update your MONO_DEBUG value accordingly (see error 142 solutions).
  2. If the option you need is not in this list, it may belong to a different variable — check MONO_GC_PARAMS (error 146) or MONO_GC_DEBUG (error 147) instead.
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Always co-emitted with error 142. It appears whenever any token in the comma-separated MONO_DEBUG value fails to match a recognized option. It will never appear on its own.

Common situations: Seen whenever a developer mistypes or uses an invalid MONO_DEBUG option; the list serves as the in-band help text so the developer can correct the value without consulting external documentation.

Understand the failure class

Related errors


AI-assisted analysis of mono/mono@0f53e9e151 (2026-08-13). Data as JSON: /api/errors/01b31882461a0feb. Report an issue: GitHub.