pdbp (Pdb+)

1.8.2 · active · verified Sun Apr 12

pdbp (Pdb+) is a Python debugger designed as a drop-in replacement for the standard `pdb` and the enhanced `pdbpp` debuggers. It aims to provide an improved debugging experience with additional features and better usability, including syntax highlighting and more powerful commands. As of version 1.8.2, it maintains an active release cadence with frequent updates for bug fixes, new Python version support, and feature enhancements.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to invoke the pdbp debugger within your Python code. When `pdbp.set_trace()` is called, execution will pause, and you'll enter the interactive debugger prompt. You can then use standard pdb commands (like `n` for next line, `s` for step, `c` for continue, `p <variable>` to print a variable) to inspect the program's state.

import pdbp

def my_function(x, y):
    print(f"Before addition: x={x}, y={y}")
    pdbp.set_trace() # The debugger will pause execution here
    result = x + y
    print(f"After addition: result={result}")
    return result

if __name__ == '__main__':
    print("Starting program...")
    my_function(5, 3)
    print("Program finished.")

view raw JSON →