https://github.com/python/cpython/commit/4e63fdb31f67fe617db0c867c8a43c925c7ce279 commit: 4e63fdb31f67fe617db0c867c8a43c925c7ce279 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: vstinner <[email protected]> date: 2026-01-22T10:47:05Z summary:
[3.14] gh-143993: Document ways to disable remote debugging support (GH-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 0b5f8359c52f8a5ce0fe436cde499553f3b8f5d5) Co-authored-by: Rafael Weingartner-Ortner <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> files: M Doc/howto/remote_debugging.rst M Doc/library/sys.rst diff --git a/Doc/howto/remote_debugging.rst b/Doc/howto/remote_debugging.rst index 78b40bcdf7127b..dfe0176b75a020 100644 --- a/Doc/howto/remote_debugging.rst +++ b/Doc/howto/remote_debugging.rst @@ -8,6 +8,16 @@ execute Python code remotely. Most platforms require elevated privileges to attach to another Python process. +Disabling remote debugging +-------------------------- + +To disable remote debugging support, use any of the following: + +* Set the :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable to ``1`` before + starting the interpreter. +* Use the :option:`-X disable_remote_debug` command-line option. +* Compile Python with the :option:`--without-remote-debug` build flag. + .. _permission-requirements: Permission requirements @@ -614,4 +624,3 @@ To inject and execute a Python script in a remote process: 6. Set ``_PY_EVAL_PLEASE_STOP_BIT`` in the ``eval_breaker`` field. 7. Resume the process (if suspended). The script will execute at the next safe evaluation point. - diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 1a25a9365a0319..136229b4c81945 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1951,6 +1951,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only interpreter is pre-release (alpha, beta, or release candidate) then the local and remote interpreters must be the same exact version. + See :ref:`remote-debugging` for more information about the remote debugging + mechanism. + .. audit-event:: sys.remote_exec pid script_path When the code is executed in the remote process, an @@ -1969,6 +1972,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only .. availability:: Unix, Windows. .. versionadded:: 3.14 + See :pep:`768` for more details. .. function:: _enablelegacywindowsfsencoding() _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
