Skip to content

Commit

Permalink
Merge pull request #10521 from MrMino/debugging_pip_docs
Browse files Browse the repository at this point in the history
Add a section about debugging to development docs
  • Loading branch information
pradyunsg authored Sep 29, 2021
2 parents a816e44 + 2c75f20 commit 76cdf8f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/html/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,25 @@ To use linters locally, run:
readability problems.


Running pip under a debugger
============================

In order to debug pip's behavior, you can run it under a debugger like so:

.. code-block:: console
$ python -m pdb -m pip --debug ...
Replace the ``...`` with arguments you'd like to run pip with. Give PDB the
``c`` ("continue") command afterwards, to run the process.

The ``--debug`` flag disables pip's exception handler, which would normally
catch all unhandled exceptions. With this flag, pip will let these exceptions
propagate outside of its main subroutine, letting them get caught by the
debugger. This way you'll be able to debug an exception post-mortem via PDB.


Building Documentation
======================

Expand Down

0 comments on commit 76cdf8f

Please sign in to comment.