diff options
author | Tian Gao <gaogaotiantian@hotmail.com> | 2023-12-07 11:19:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 11:19:33 (GMT) |
commit | 3d712a9f4c9f366edbe16b804ec4f6ae50b0a59f (patch) | |
tree | 4b6915cce4e4cbd629678b965d47e2949fd30ceb /Doc | |
parent | 4b125dd31a634871d3b2d06ebfd1b9aef539766b (diff) | |
download | cpython-3d712a9f4c9f366edbe16b804ec4f6ae50b0a59f.zip cpython-3d712a9f4c9f366edbe16b804ec4f6ae50b0a59f.tar.gz cpython-3d712a9f4c9f366edbe16b804ec4f6ae50b0a59f.tar.bz2 |
gh-102980: Redirect output of pdb's `interact` command, add tests and improve docs (#111194)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/pdb.rst | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index bbc6aac..2495dcf 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -570,10 +570,27 @@ can be overridden by the local file. Start an interactive interpreter (using the :mod:`code` module) whose global namespace contains all the (global and local) names found in the current - scope. + scope. Use ``exit()`` or ``quit()`` to exit the interpreter and return to + the debugger. + + .. note:: + + Because interact creates a new global namespace with the current global + and local namespace for execution, assignment to variables will not + affect the original namespaces. + However, modification to the mutable objects will be reflected in the + original namespaces. .. versionadded:: 3.2 + .. versionadded:: 3.13 + ``exit()`` and ``quit()`` can be used to exit :pdbcmd:`interact` + command. + + .. versionchanged:: 3.13 + :pdbcmd:`interact` directs its output to the debugger's + output channel rather than :data:`sys.stderr`. + .. _debugger-aliases: .. pdbcommand:: alias [name [command]] |