PuDB: a console-based visual debugger for Python

2025.1.5 · active · verified Sat Apr 11

PuDB is a full-screen, console-based visual debugger for Python. It aims to provide the benefits of modern GUI-based debuggers in a lightweight, keyboard-friendly terminal interface. PuDB allows developers to debug code directly in their terminal environment, with features like syntax-highlighted source, stack, breakpoints, and variables all visible simultaneously. The current version is 2025.1.5, and it maintains an active development and release cadence.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to embed `pudb` directly into your Python code using `pudb.set_trace()`. When the execution reaches this line, the PuDB interface will launch in your terminal, allowing you to step through the code, inspect variables, and manage breakpoints.

import pudb

def factorial(n):
    if n == 0:
        return 1
    else:
        pudb.set_trace() # Execution will pause here
        return n * factorial(n-1)

print(f"Factorial of 5 is: {factorial(5)}")

view raw JSON →