pdb++ (pdbpp)

0.12.1 · active · verified Sat Apr 11

pdb++ (pdbpp) is a robust, drop-in replacement for the standard Python debugger, `pdb`. It enhances the debugging experience with features like colorful TAB completion (via fancycompleter), optional syntax highlighting (via Pygments), a persistent 'sticky' mode that always shows the current code context, and smart command parsing. It aims for full compatibility with `pdb` while adding significant quality-of-life improvements. The current version is 0.12.1, with ongoing maintenance and updates.

Warnings

Install

Imports

Quickstart

Install `pdbpp`, then simply use `import pdb; pdb.set_trace()` anywhere in your code. When execution reaches this line, a `Pdb++` interactive prompt will appear, offering advanced debugging features. You can then use commands like `n` (next), `s` (step), `c` (continue), `l` (list), and `sticky`.

import pdb

def my_function(a, b):
    result = a + b
    pdb.set_trace()  # Execution will pause here
    return result

if __name__ == '__main__':
    print(my_function(5, 3))

view raw JSON →