On , I learnt ...

pdbpp has a useful ‘sticky’ mode

pdbpp provides some additional interactive commands to pdb. One such command is sticky which toggles “sticky mode”:

When in this mode, every time the current position changes, the screen is repainted and the whole function shown. Thus, when doing step-by-step execution you can easily follow the flow of the execution.

I find this a useful mode to use.

To enable this by default, create a ~/.pdbrc.py file with contents:

import pdb
class Config(pdb.DefaultConfig):
    sticky_by_default = True