Tutorial: Debugging your Python Applications with pdb

///Tutorial: Debugging your Python Applications with pdb

Tutorial: Debugging your Python Applications with pdb

FavoriteLoadingAdd to favorites

In this quick tutorial, Marakana Python instructor, Simeon Franklin, is going to show you how you can debug your Python applications using the Python debugger, pdb.

Simeon will start off with a quick intro to pdb: what it is, when to use it, and how to launch pdb. Then he’ll jump into a demo of pdb in action.

By |2017-05-16T21:19:48+00:00May 16th, 2017|Python Video Tutorials|13 Comments


  1. almog yalin May 16, 2017 at 9:32 pm - Reply

    If you are inside pdb, and you want to evaluate a line of python code that conflicts with the pdb command, you can precede the python code with an exclamation mark. For example, if you want to show the value of the the variable "list" use:
    (pdb) ! list

  2. Tom M May 16, 2017 at 9:35 pm - Reply

    Seems like a pretty medieval way to debug code.  If this the best Python offers?

  3. BioGeek May 16, 2017 at 9:41 pm - Reply

    Can you link to the the buggy bubble sort code, so that we can follow along at home.

  4. 8thDay May 16, 2017 at 9:41 pm - Reply

    Thank you for this concise tutorial! I’m ashamed to say this, but I never got through the wall of text in in manual…

  5. Farzin F May 16, 2017 at 9:46 pm - Reply

    winpdb doesn’t work with python3

  6. aswan korula May 16, 2017 at 9:48 pm - Reply


  7. Dave Kirby May 16, 2017 at 9:52 pm - Reply

    A good introduction, but you say in the video that you cannot create watch points. From Python 2.5 you can do this using the "commands" command. e.g. create breakpoint 1 then enter:

    commands 1
    print x,y,z

    Then run the code. Every time the breakpoint is hit the variables x, y, and z will be printed and it will continue running.

  8. JamoeMills May 16, 2017 at 9:55 pm - Reply

    Thanks for making this video 🙂

  9. Helevatic May 16, 2017 at 9:57 pm - Reply

    i hate python

  10. Robin Morris May 16, 2017 at 10:04 pm - Reply

    Concise, no waffle. thx

  11. Lewis Villierme May 16, 2017 at 10:07 pm - Reply

    Thanks ! It is a heplful video.

  12. Antonius Momac May 16, 2017 at 10:07 pm - Reply

    WOW. Great Job presenting. and THANK YOU for geting to the point quickly Simeon…. I can now use pdb

  13. Chris Oaks May 16, 2017 at 10:15 pm - Reply

    whenever I type l or list it just returns [EOF] regardless of where I am in the program

Leave A Comment