I wish to inspect the code inside a (pip installed) module that I've imported (called transformers if it is relevant). So right now what I am doing is putting breakpoint()
where relevant in the site_package location and calling the module inside test.py
.
from transformers import AutoModel, AutoTokenizer, EncoderDecoderModel
However, Ideally I wish to set and remove breakpoints on the fly as I inspect the code, as I could normally do with a python module I wrote. Wondering if there is something similar for external libraries.
Alternate Solution
I would equally be happy if I could write breakpoint()
where I need it to be on the fly. I used to do this with Jupyter with my own modules by adding the following two lines:
%load_ext autoreload
%autoreload 2
However, this did not work for an external library when I added in new breakpoints.