Skip to content

Conversation

@RafaelWO
Copy link
Contributor

@RafaelWO RafaelWO commented Jan 18, 2026

Although PEP 768 mentions how to disable the mechanism of remote debugging, it is not documented in the Python docs.

This change adds a note on how to disable remote debugging support in a Python interpreter to the remote debugging how-to and to the sys.remote_exec docs.


📚 Documentation preview 📚:

Although PEP 768 mentions how to disable the mechanism of
remote debugging, it is not documented in the Python docs.

This change adds a note on how to disable remote debugging support
in a Python interpreter to the remote debugging how-to and
to the sys.remote_exec docs.
RafaelWO and others added 2 commits January 19, 2026 10:04
In remote_rebugging.rst

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
in sys.rst

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk
Copy link
Member

hugovk commented Jan 19, 2026

Thanks for the PR! It's a good idea to document these three methods together.

@pablogsal What do you think about the placement and prominence of these?

Maybe they don't need to be highlighted in a note admonition and could be regular text?

In the HOWTO, it could perhaps to its own section with a header, which will make it easier to share.

In the sys page, perhaps it could also be regular text at the end of function description (just before "Availability: Unix, Windows").


Most platforms require elevated privileges to attach to another Python process.

.. note::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably deserves its own little section that appears in the sidebar :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, added in 52a4439 :)

To disable remote debugging support, use any of the following:

* Set the :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable to
any value before starting the interpreter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer suggesting a specific value such as 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5d7a544

Comment on lines 1998 to 1999
local and remote interpreters must be the same exact version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding a reference to the HOWTO here? For example:

See also :ref:`remote-debugging` for information about the remote debugging protocol.

@pablogsal
Copy link
Member

@pablogsal What do you think about the placement and prominence of these?

I think the one in sys.remote_exec needs to link against the other page. Most users of that don't care about deactivating it as that is mostly an "advanced" use case I would say so I would recommend just linking to the other places

Instead of duplicating the info about disabling remote debugging.
Similar to how it's done for other methods introduced in PEPs.
@RafaelWO
Copy link
Contributor Author

I think the one in sys.remote_exec needs to link against the other page. Most users of that don't care about deactivating it as that is mostly an "advanced" use case I would say so I would recommend just linking to the other places

I replaced the note about how to disable remote debugging in sys.remote_exec with a link to the HOWTO (which mentions how to disable it) in a79c3cc. I hope I understood your suggestion correctly 🙂

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

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants