Skip to content

gh-143993: Document ways to disable remote debugging support#143994

Merged
vstinner merged 8 commits intopython:mainfrom
RafaelWO:docs/remote-debug-env-var
Jan 22, 2026
Merged

gh-143993: Document ways to disable remote debugging support#143994
vstinner merged 8 commits intopython:mainfrom
RafaelWO:docs/remote-debug-env-var

Conversation

@RafaelWO
Copy link
Copy Markdown
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.
Comment thread Doc/howto/remote_debugging.rst Outdated
Comment thread Doc/library/sys.rst Outdated
Comment thread Doc/howto/remote_debugging.rst
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
Copy Markdown
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").

Comment thread Doc/howto/remote_debugging.rst Outdated

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

.. note::
Copy link
Copy Markdown
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
Copy Markdown
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 :)

Comment thread Doc/howto/remote_debugging.rst Outdated
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
Copy Markdown
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
Copy Markdown
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 thread Doc/library/sys.rst
Comment on lines 1998 to 1999
local and remote interpreters must be the same exact version.

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 🙂

Copy link
Copy Markdown
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks a lot! @RafaelWO

Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Jan 22, 2026
@vstinner vstinner merged commit 0b5f835 into python:main Jan 22, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jan 22, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @RafaelWO for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2026
…ythonGH-143994)

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.
(cherry picked from commit 0b5f835)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jan 22, 2026

GH-144139 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jan 22, 2026
@vstinner
Copy link
Copy Markdown
Member

Merged, thanks.

vstinner pushed a commit that referenced this pull request Jan 22, 2026
…H-143994) (#144139)

gh-143993: Document ways to disable remote debugging support (GH-143994)

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.
(cherry picked from commit 0b5f835)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@RafaelWO RafaelWO deleted the docs/remote-debug-env-var branch January 22, 2026 15:43
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…ython#143994)

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.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants