Skip to content

GH-56426: Add cross-reference to the documentation for faulthandler, traceback, and pdb. #101157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Doc/library/faulthandler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Dumping the traceback
Dump the tracebacks of all threads into *file*. If *all_threads* is
``False``, dump only the current thread.

See also :func:`traceback.print_tb` which can be used to print a traceback object.

.. versionchanged:: 3.5
Added support for passing file descriptor to this function.

Expand Down Expand Up @@ -179,3 +181,10 @@ handler:
File "<stdin>", line 1 in <module>
Segmentation fault

.. seealso::

Module :mod:`pdb`
Interactive source code debugger for Python programs.

Module :mod:`traceback`
Standard interface to extract, format and print stack traces of Python programs.
9 changes: 9 additions & 0 deletions Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,15 @@ can be overridden by the local file.

Print the return value for the last return of a function.

.. seealso::

Module :mod:`faulthandler`
Used to dump Python tracebacks explicitly, on a fault, after a timeout,
or on a user signal.

Module :mod:`traceback`
Standard interface to extract, format and print stack traces of Python programs.

.. rubric:: Footnotes

.. [1] Whether a frame is considered to originate in a certain module
Expand Down
8 changes: 8 additions & 0 deletions Doc/library/traceback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -537,3 +537,11 @@ This last example demonstrates the final few formatting functions:
>>> an_error = IndexError('tuple index out of range')
>>> traceback.format_exception_only(type(an_error), an_error)
['IndexError: tuple index out of range\n']

.. seealso::

Module :mod:`faulthandler`
Used to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal.

Module :mod:`pdb`
Interactive source code debugger for Python programs.