Using PDB to Debug Your Application

pdb is an interactive tool that comes with Python, which allows you to break your program at an arbitrary point, examine values, and step through code. It’s often much more useful than print statements or logging statements to examine program state. You can place a pdb.set_trace() statement in your Pyramid application at a place where you’d like to examine program state. When you issue a request to the application, and that point in your code is reached, you will be dropped into the pdb debugging console within the terminal that you used to start your application.

There are lots of great resources that can help you learn PDB.

Previous topic


Next topic

Debugging Pyramid