Alternative Python debuggers

While pdb has the advantage of being available out of the box, it can be quite terse, and a few more comfortable options exist.

The Iron Python debugger, ipdb, is a popular choice that uses the same commands as pdb, but adds improvements such as tab completion and syntax highlighting for more comfortable use. It can be installed with:

$ sudo pip install ipdb

And a breakpoint is added with the following line: 

import ipdb; ipdb.set_trace() 

Another alternative debugger is pudb. It also supports the same commands as pdb and works in text-only Terminals, but uses a graphical display similar to what you can find in an IDE debugger. Useful information, such as the variables in the current context and their values, ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.