Documentation
The -X option that disables remote debugging (PEP 768) is documented as
-X disable_remote_debug (underscore) in three places:
Doc/using/cmdline.rst (the -X list and the PYTHON_DISABLE_REMOTE_DEBUG entry)
Doc/howto/remote_debugging.rst (two places)
But the interpreter only recognises the hyphenated spelling:
Python/initconfig.c calls config_get_xoption(config, L"disable-remote-debug"),
and python --help-xoptions prints -X disable-remote-debug. Doc/whatsnew/3.14.rst
also uses the hyphen.
Unknown -X options are silently ignored, so anyone who copies the documented
spelling ends up with remote debugging still enabled, with no error.
$ python3.14 -X disable_remote_debug -c "import sys; print(sys.is_remote_debug_enabled())"
True
$ python3.14 -X disable-remote-debug -c "import sys; print(sys.is_remote_debug_enabled())"
False
Same result on 3.15.0rc3. Because this option is a security control, the silent
no-op is the important part. Suggested fix: use disable-remote-debug in
cmdline.rst and remote_debugging.rst.
Linked PRs
Documentation
The
-Xoption that disables remote debugging (PEP 768) is documented as-X disable_remote_debug(underscore) in three places:Doc/using/cmdline.rst(the-Xlist and thePYTHON_DISABLE_REMOTE_DEBUGentry)Doc/howto/remote_debugging.rst(two places)But the interpreter only recognises the hyphenated spelling:
Python/initconfig.ccallsconfig_get_xoption(config, L"disable-remote-debug"),and
python --help-xoptionsprints-X disable-remote-debug.Doc/whatsnew/3.14.rstalso uses the hyphen.
Unknown
-Xoptions are silently ignored, so anyone who copies the documentedspelling ends up with remote debugging still enabled, with no error.
Same result on 3.15.0rc3. Because this option is a security control, the silent
no-op is the important part. Suggested fix: use
disable-remote-debugincmdline.rstandremote_debugging.rst.Linked PRs