How to Solve NameError: name 'pdb' is not defined

Solution: Import the 'pdb' module

# Add the following line to the top of your code
import pdb

 

For more information:
Python pdb