{"id":3734,"library":"pdbpp","title":"pdb++ (pdbpp)","description":"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.","status":"active","version":"0.12.1","language":"en","source_language":"en","source_url":"https://github.com/pdbpp/pdbpp","tags":["debugger","pdb","debugging","developer-tool","python"],"install":[{"cmd":"pip install pdbpp","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge pdbpp","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Provides colorful TAB completion for Python expressions.","package":"fancycompleter","optional":false},{"reason":"Enables optional syntax highlighting for code listings and sticky mode.","package":"Pygments","optional":true},{"reason":"Required for the 'exec_if_unfocused' configuration option, which executes a shell command when the debugger prompt starts and the terminal is unfocused.","package":"wmctrl","optional":true}],"imports":[{"note":"pdbpp is designed as a drop-in replacement for the standard `pdb` module. Once installed, `import pdb` will automatically leverage pdbpp's enhanced features.","symbol":"set_trace","correct":"import pdb; pdb.set_trace()"}],"quickstart":{"code":"import pdb\n\ndef my_function(a, b):\n    result = a + b\n    pdb.set_trace()  # Execution will pause here\n    return result\n\nif __name__ == '__main__':\n    print(my_function(5, 3))","lang":"python","description":"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`."},"warnings":[{"fix":"Manually remove `pdb.set_trace()` calls or use conditional breakpoints. Many teams search for 'pdb.' before commits.","message":"Leaving `pdb.set_trace()` calls in production code will halt program execution unexpectedly. Always remove or comment out breakpoints before deploying.","severity":"gotcha","affected_versions":"All versions"},{"fix":"To force a command when ambiguity exists, prefix it with `!!` (e.g., `!!c` to execute `continue`).","message":"pdb++'s 'smart command parsing' prioritizes local variables over debugger commands if they share the same name (e.g., a variable `c` vs. the `continue` command).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade `pdbpp` to version 0.12.1 or higher to ensure full compatibility with Python 3.11+ for `python -m pdb` usage.","message":"Older versions of `pdbpp` experienced compatibility issues with `python -m pdb` when running on Python 3.11 and newer versions.","severity":"breaking","affected_versions":"<=0.12.0 (specifically affected 3.11+)"},{"fix":"Be aware of potential feature limitations in non-local terminal environments. Direct terminal interaction offers the best experience.","message":"When `pdbpp` is used in remote debugging setups (e.g., with `remote-pdb`), advanced features like 'sticky mode' and TAB completion may not function correctly due to terminal environment differences.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the official PyPI page and GitHub repository for the latest maintenance status and release information.","message":"Some online resources might suggest that `pdbpp` is unmaintained. This is often a misunderstanding; while `pdbp` (a separate project) builds upon `pdbpp` and offers its own enhancements, `pdbpp` itself continues to be actively maintained with recent releases and GitHub activity.","severity":"gotcha","affected_versions":"N/A (confusion-related)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}