2

I need pdb in almost all of my python files. Is there any way by which I can get rid of the pain of writing import pdb in every python file I create.

In other words, Is there any way I can just write pdb.set_trace() and can run the program. Something like including pdb in core python libraries,or making an alias for command python etc.

1 Answers1

0

Yup, as of Python 3.7 just write breakpoint() which is a builtin, with some enhanced capabilities as well.

JL Peyret
  • 10,917
  • 2
  • 54
  • 73