I leave breakpoint() calls in while I work, and the environment variable controls them.
PYTHONBREAKPOINT=0 python3 app.py
PYTHONBREAKPOINT=ipdb.set_trace python3 app.py
breakpoint() calls whatever PYTHONBREAKPOINT names. Without the variable it opens pdb. The value 0 turns every call into a no-op, which is a safe way to run a program that still contains a forgotten one. A dotted path such as ipdb.set_trace or pudb.set_trace switches debuggers, as long as that package is installed. Still remove stray calls before you ship, since the variable can be set differently in production.
Further reading: breakpoint() in the built-in functions reference