Debugging in Python With pdb

Austin Cepalia

Nowadays, we often take for granted the excellent debuggers built into our favorite IDEs. But how do you debug your Python code when you don’t have the luxury of using an IDE?

pdb, short for Python DeBugger, is a module for interactive source code debugging. It’s built into the Python Standard Library, so it’s always accessible to you. Because it runs in the command line, it’s especially helpful when you’re developing on remote systems.

In this course, you’ll learn how to perform the most common debugging tasks using pdb, including setting breakpoints, stepping through code, viewing stack traces, creating watch lists, and more.

What’s Included:

Related Learning Paths:

About Austin Cepalia

Austin is a video tutorial author at Real Python. He graduated with a BS in CS from Rochester Institute of Technology in 2023, and now he writes software to support the semiconductor industry.

» More about Austin

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for stephenm

stephenm on Feb. 28, 2021

Excellent tutorial! Easy to follow, clearly explained. Thank you!

← Browse All Courses