Visitar URL original
Docs: -X disable_remote_debug is spelled with an underscore, but the interpreter only accepts disable-remote-debug · Issue #159010 · python/cpython · GitHub
Skip to content

Docs: -X disable_remote_debug is spelled with an underscore, but the interpreter only accepts disable-remote-debug #159010

Description

@ArtVsMark

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions