Here's a nice introduction:
But most often, if I pull out a debugger, what I really want is to play with the objects in a python shell. pdb has its own shell, but . . . there are a lot of missing features. In particular, if you want to explore a particular object it's weak because there isn't a tab completion feature.
If you already have ipython, you can use the pdb functionality of pdb in the more powerful ipython shell by using ipdb.
It's simple to install and more than worth it. Just do
pip install ipdb.
Then, instead of
'import pdb'
do
'import ipdb'
and instead of
pdb.set_trace()
do
ipdb.set_trace().
You're welcome!