Python Debugging

Use pdb module in debugging python:

1$ python3 -m pdb pdb_example.py

and something like this:

 1student@ubuntu:~$ python3 -m pdb pdb_example.py
 2> /home/student/pdb_example.py(1)<module>()
 3-> class Student:
 4(Pdb) continue
 50
 61
 72
 83
 94
10The program finished and will be restarted
11> /home/student/pdb_example.py(1)<module>()
12-> class Student:
13(Pdb)
...

See https://hub.packtpub.com/debugging-and-profiling-python-scripts-tutorial