pdbpp


Namepdbpp JSON
Version 0.11.7 PyPI version JSON
download
home_pageNone
Summarypdb++, a drop-in replacement for pdb
upload_time2025-07-18 09:36:02
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords pdb debugger tab color completion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            pdb++, a drop-in replacement for pdb
====================================

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
   :target: https://github.com/astral-sh/ruff
   :alt: Ruff

.. image:: https://github.com/bretello/pdbpp/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/bretello/pdbpp/actions/workflows/ci.yml
   :alt: Tests

.. image:: https://codecov.io/gh/pdbpp/pdbpp/graph/badge.svg?token=IOKP5121OU
   :target: https://codecov.io/gh/pdbpp/pdbpp
   :alt: Codecov

.. image:: https://img.shields.io/pypi/v/pdbpp.svg
   :target: https://pypi.org/project/pdbpp/
   :alt: PyPI version


What is it?
-----------

This module is an extension of the pdb_ module of the standard library.  It is
meant to be fully compatible with its predecessor, yet it introduces a number
of new features to make your debugging experience as nice as possible.

.. image:: https://user-images.githubusercontent.com/412005/64484794-2f373380-d20f-11e9-9f04-e1dabf113c6f.png

``pdb++`` features include:

  - colorful TAB completion of Python expressions (through fancycompleter_)

  - optional syntax highlighting of code listings (through Pygments_)

  - `sticky mode`_

  - several new commands to be used from the interactive ``(Pdb++)`` prompt

  - `smart command parsing`_ (hint: have you ever typed ``r`` or ``c`` at the
    prompt to print the value of some variable?)

  - additional convenience functions in the ``pdb`` module, to be used from
    your program

``pdb++`` is meant to be a drop-in replacement for ``pdb``. If you find some
unexpected behavior, please report it as a bug.

.. _pdb: http://docs.python.org/library/pdb.html
.. _fancycompleter: https://github.com/bretello/fancycompleter
.. _Pygments: http://pygments.org/

Installation
------------

    $ pip install pdbpp

Usage
-----

Note that the module is called ``pdb.py`` so that ``pdb++`` will automatically
be used in all places that do ``import pdb`` (e.g. ``pytest --pdb`` will
give you a ``pdb++`` prompt).

The old ``pdb`` module is still available by doing e.g. ``import pdb;
pdb.pdb.set_trace()``.

New interactive commands
------------------------

The following are new commands that you can use from the interactive
``(Pdb++)`` prompt.

.. _`sticky mode`:

``sticky [start end]``
  Toggle **sticky mode**.  When in this mode, every time the current position
  changes, the screen is repainted and the whole function shown.  Thus, when
  doing step-by-step execution you can easily follow the flow of the
  execution.  If ``start`` and ``end`` are given, sticky mode is enabled and
  only lines within that range (extremes included) will be displayed.


``longlist`` (``ll``)
  List source code for the current function.  Different from the normal pdb
  ``list`` command, ``longlist`` displays the whole function.  The current
  line is marked with ``->``.  In case of post-mortem debugging, the line
  which actually raised the exception is marked with ``>>``.  If the
  ``highlight`` `config option`_ is set and Pygments_ is installed, the source
  code is highlighted.


``interact``
  Start an interactive interpreter whose global namespace contains all the
  names found in the current scope.


``display EXPRESSION``
  Add an expression to the **display list**; expressions in this list are
  evaluated at each step, and printed every time its value changes.
  **WARNING**: since these expressions are evaluated multiple times, make sure
  not to put expressions with side-effects in the display list.

``undisplay EXPRESSION``:
  Remove ``EXPRESSION`` from the display list.

``source EXPRESSION``
  Show the source code for the given function/method/class.

``edit EXPRESSION``
  Open the editor in the right position to edit the given
  function/method/class.  The editor used is specified in a `config
  option`_.

``hf_unhide``, ``hf_hide``, ``hf_list``
  Some frames might be marked as "hidden" by e.g. using the `@pdb.hideframe`_
  function decorator.  By default, hidden frames are not shown in the stack
  trace, and cannot be reached using ``up`` and ``down``.  You can use
  ``hf_unhide`` to tell pdb to ignore the hidden status (i.e., to treat hidden
  frames as normal ones), and ``hf_hide`` to hide them again.  ``hf_list``
  prints a list of hidden frames.
  The config option ``enable_hidden_frames`` can be used to disable handling
  of hidden frames in general.


Smart command parsing
---------------------

By default, pdb tries hard to interpret what you enter at the command prompt
as one of its builtin commands.  However, this is inconvenient if you want to
just print the value of a local variable which happens to have the same name
as one of the commands. E.g.::

    (Pdb) list
      1
      2     def fn():
      3         c = 42
      4         import pdb;pdb.set_trace()
      5  ->     return c
    (Pdb) c

In the example above, instead of printing 42 pdb interprets the input as the
command ``continue``, and then you lose your prompt.  It's even worse than
that, because it happens even if you type e.g. ``c.__class__``.

pdb++ fixes this unfriendly (from the author's point of view, of course :-))
behavior by always preferring the variable in scope, if it exists.  If you really
want to execute the corresponding command, you can prefix it with ``!!``.
Thus, the example above becomes::

    (Pdb++) list
      1
      2     def fn():
      3         c = 42
      4         import pdb;pdb.set_trace()
      5  ->     return c
    (Pdb++) c
    42
    (Pdb++) !!c

Note that the "smart" behavior takes place only when there is ambiguity, i.e.
if there exists a variable with the same name as a command: in all other
cases, everything works as usual.

Regarding the ``list`` command itself, using ``list(…`` is a special case
that gets handled as the Python builtin::

    (Pdb++) list([1, 2])
    [1, 2]

Additional functions in the ``pdb`` module
------------------------------------------

The ``pdb`` module that comes with pdb++ includes all the functions and
classes that are in the module from the standard library.  If you find any
difference, please report it as a bug.

In addition, there are some new convenience functions that are unique to
pdb++.

``pdb.xpm()``
  eXtended Post Mortem: it is equivalent to
  ``pdb.post_mortem(sys.exc_info()[2])``.  If used inside an ``except``
  clause, it will start a post-mortem pdb prompt from the line that raised the
  exception being caught.

``pdb.disable()``
  Disable ``pdb.set_trace()``: any subsequent call to it will be ignored.

``pdb.enable()``
  Re-enable ``pdb.set_trace()``, in case it was disabled by ``pdb.disable()``.

.. _`@pdb.hideframe`:

``@pdb.hideframe``
  A function decorator that tells pdb++ to hide the frame corresponding to the
  function.  Hidden frames do not show up when using interactive commands such
  as ``up``, ``down`` or ``where``, unless ``hf_unhide`` is invoked.

``@pdb.break_on_setattr(attrname, condition=always)``
  class decorator: break the execution of the program every time the
  attribute ``attrname`` is set on any instance of the class. ``condition`` is
  a callable that takes the target object of the ``setattr`` and the actual value;
  by default, it breaks every time the attribute is set. E.g.::

      @break_on_setattr('bar')
      class Foo:
          pass
      f = Foo()
      f.bar = 42    # the program breaks here

  If can be used even after the class has already been created, e.g. if we
  want to break when some attribute of a particular object is set::

      class Foo:
          pass
      a = Foo()
      b = Foo()

      def break_if_a(obj, value):
          return obj is a

      break_on_setattr('bar', condition=break_if_a)(Foo)
      b.bar = 10   # no break
      a.bar = 42   # the program breaks here

  This can be used after ``pdb.set_trace()`` also::

      (Pdb++) import pdb
      (Pdb++) pdb.break_on_setattr('tree_id')(obj.__class__)
      (Pdb++) continue


Configuration and customization
-------------------------------

.. _`config option`:

To customize pdb++, you can put a file named ``.pdbrc.py`` in your home
directory.  The file must contain a class named ``Config`` inheriting from
``pdb.DefaultConfig`` and override the desired values.

The following is a list of the options you can customize, together with their
default value:

``prompt = '(Pdb++) '``
  The prompt to show when in interactive mode.

``highlight = True``
  Highlight line numbers and the current line when showing the ``longlist`` of
  a function or when in **sticky mode**.

``encoding = 'utf-8'``
  File encoding. Useful when there are international characters in your string
  literals or comments.

``sticky_by_default = False``
  Determine whether pdb++ starts in sticky mode or not.

``line_number_color = pdb.Color.turquoise``
  The color to use for line numbers.
  See `Notes on color options`_.

``filename_color = pdb.Color.yellow``
  The color to use for file names when printing the stack entries.
  See `Notes on color options`_.

``current_line_color = "39;49;7"``
  The SGR parameters for the ANSI escape sequence to highlight the current
  line.  The default uses the default foreground (``39``) and background
  (``49``) colors, inversed (``7``).
  See `Notes on color options`_.

``editor = None``
  The command to invoke when using the ``edit`` command. By default, it uses ``$EDITOR``
  if set, else ``vim`` or ``vi`` (if found).  If only the editor command is specified, the ``emacs`` and
  ``vi`` notation will be used to specify the line number: ``COMMAND +n filename``. It's
  otherwise possible to use another syntax by using the placeholders ``{filename}`` and
  ``{lineno}``. For example with sublime text, specify ``editor = "subl
  {filename}:{lineno}"``.

``truncate_long_lines = True``
  Truncate lines which exceed the terminal width.

``enable_hidden_frames = True``
  Certain frames can be hidden by default.
  If enabled, the commands ``hf_unhide``, ``hf_hide``, and ``hf_list`` can be
  used to control display of them.

``show_hidden_frames_count = True``
  If ``enable_hidden_frames`` is ``True`` this controls if the number of
  hidden frames gets displayed.

``def setup(self, pdb): pass``
  This method is called during the initialization of the ``Pdb`` class. Useful
  to do complex setup.

``show_traceback_on_error = True``
  Display tracebacks for errors via ``Pdb.error``, that come from
  ``Pdb.default`` (i.e. the execution of an unrecognized pdb command),
  and are not a direct cause of the expression itself (e.g. ``NameError``
  with a command like ``doesnotexist``).

  With this option disabled only ``*** exception string`` gets printed, which
  often misses useful context.

``show_traceback_on_error_limit = None``
  This option sets the limit to be used with ``traceback.format_exception``,
  when ``show_traceback_on_error`` is enabled.

Options relevant for source code highlighting (using Pygments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``use_pygments = None``
  By default Pygments_ is used for syntax highlighting of source code when it
  can be imported, e.g. when showing the ``longlist`` of a function or when in
  **sticky mode**.

``pygments_formatter_class = None``

  You can configure the Pygments formatter to use via the
  ``pygments_formatter_class`` config setting as a string (dotted path).
  This should be one of the following typically:
  ``"pygments.formatters.Terminal256Formatter"``,
  ``"pygments.formatters.TerminalTrueColorFormatter"``, or
  ``"pygments.formatters.TerminalFormatter"``.

  The default is to auto-detect the best formatter based on the ``$TERM``
  variable, e.g. it uses ``Terminal256Formatter`` if the ``$TERM`` variable
  contains "256color" (e.g. ``xterm-256color``), but also knows about
  e.g. "xterm-kitty" to support true colors (``TerminalTrueColorFormatter``).
  ``TerminalFormatter`` gets used as a fallback.

``pygments_formatter_kwargs = {}``

  A dictionary of keyword arguments to pass to the formatter's constructor.

  The default arguments (updated with this setting) are::

      {
          "style": "default",
          "bg": self.config.bg,
          "colorscheme": self.config.colorscheme,
      }

    ``style = 'default'``

     The style to use, can be a string or a Pygments Style subclass.
     E.g. ``"solarized-dark"``.
     See http://pygments.org/docs/styles/.

   ``bg = 'dark'``

     Selects a different palette for dark/light backgrounds.
     Only used by ``TerminalFormatter``.

   ``colorscheme = None``

     A dictionary mapping token types to (lightbg, darkbg) color names or
     ``None`` (default: ``None`` = use builtin colorscheme).
     Only used by ``TerminalFormatter``.

Example::

    class Config(pdb.DefaultConfig):
        pygments_formatter_class = "pygments.formatters.TerminalTrueColorFormatter"
        pygments_formatter_kwargs = {"style": "solarized-light"}

.. _SGR parameters: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters

Notes on color options
^^^^^^^^^^^^^^^^^^^^^^

The values for color options will be used inside of the SGR escape sequence
``\e[%sm`` where ``\e`` is the ESC character and ``%s`` the given value.
See `SGR parameters`_.

The following means "reset all colors" (``0``), set foreground color to 18
(``48;5;18``), and background to ``21``: ``"0;48;5;18;38;5;21"``.

Constants are available via ``pdb.Color``, e.g. ``pdb.Color.red``
(``"31;01"``), but in general any string can be used here.

Coding guidelines
-----------------

``pdb++`` is developed using Test Driven Development, and we try to keep test
coverage high.

As a general rule, every commit should come with its own test. If it's a new
feature, it should come with one or many tests which exercise it. If it's a
bug fix, the test should **fail before the fix**, and pass after.

The goal is to make refactoring easier in the future: if you wonder why a
certain line of code does something, in principle it should be possible to
comment it out and see which tests fail.

In exceptional cases, the test might be too hard or impossible to write: in
such cases it is fine to do a commit without a test, but you should explain
very precisely in the commit message why it is hard to write a test and how to
reproduce the buggy behavior by hand.

It is fine NOT to write a test in the following cases:

  - typos, documentation, and in general any non-coding commit

  - code refactorings which do not add any feature

  - commits which fix an already failing test

  - commits to silence warnings

  - purely cosmetic changes, such as change the color of the output

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pdbpp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "bretello <bretello@distruzione.org>",
    "keywords": "pdb, debugger, tab, color, completion",
    "author": null,
    "author_email": "Antonio Cuni <anto.cuni@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c6/4c/118ef9534ac0632859b48c305d8c5dc9d6f963564fdfa66bc785c560247c/pdbpp-0.11.7.tar.gz",
    "platform": "unix",
    "description": "pdb++, a drop-in replacement for pdb\n====================================\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n   :target: https://github.com/astral-sh/ruff\n   :alt: Ruff\n\n.. image:: https://github.com/bretello/pdbpp/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/bretello/pdbpp/actions/workflows/ci.yml\n   :alt: Tests\n\n.. image:: https://codecov.io/gh/pdbpp/pdbpp/graph/badge.svg?token=IOKP5121OU\n   :target: https://codecov.io/gh/pdbpp/pdbpp\n   :alt: Codecov\n\n.. image:: https://img.shields.io/pypi/v/pdbpp.svg\n   :target: https://pypi.org/project/pdbpp/\n   :alt: PyPI version\n\n\nWhat is it?\n-----------\n\nThis module is an extension of the pdb_ module of the standard library.  It is\nmeant to be fully compatible with its predecessor, yet it introduces a number\nof new features to make your debugging experience as nice as possible.\n\n.. image:: https://user-images.githubusercontent.com/412005/64484794-2f373380-d20f-11e9-9f04-e1dabf113c6f.png\n\n``pdb++`` features include:\n\n  - colorful TAB completion of Python expressions (through fancycompleter_)\n\n  - optional syntax highlighting of code listings (through Pygments_)\n\n  - `sticky mode`_\n\n  - several new commands to be used from the interactive ``(Pdb++)`` prompt\n\n  - `smart command parsing`_ (hint: have you ever typed ``r`` or ``c`` at the\n    prompt to print the value of some variable?)\n\n  - additional convenience functions in the ``pdb`` module, to be used from\n    your program\n\n``pdb++`` is meant to be a drop-in replacement for ``pdb``. If you find some\nunexpected behavior, please report it as a bug.\n\n.. _pdb: http://docs.python.org/library/pdb.html\n.. _fancycompleter: https://github.com/bretello/fancycompleter\n.. _Pygments: http://pygments.org/\n\nInstallation\n------------\n\n    $ pip install pdbpp\n\nUsage\n-----\n\nNote that the module is called ``pdb.py`` so that ``pdb++`` will automatically\nbe used in all places that do ``import pdb`` (e.g. ``pytest --pdb`` will\ngive you a ``pdb++`` prompt).\n\nThe old ``pdb`` module is still available by doing e.g. ``import pdb;\npdb.pdb.set_trace()``.\n\nNew interactive commands\n------------------------\n\nThe following are new commands that you can use from the interactive\n``(Pdb++)`` prompt.\n\n.. _`sticky mode`:\n\n``sticky [start end]``\n  Toggle **sticky mode**.  When in this mode, every time the current position\n  changes, the screen is repainted and the whole function shown.  Thus, when\n  doing step-by-step execution you can easily follow the flow of the\n  execution.  If ``start`` and ``end`` are given, sticky mode is enabled and\n  only lines within that range (extremes included) will be displayed.\n\n\n``longlist`` (``ll``)\n  List source code for the current function.  Different from the normal pdb\n  ``list`` command, ``longlist`` displays the whole function.  The current\n  line is marked with ``->``.  In case of post-mortem debugging, the line\n  which actually raised the exception is marked with ``>>``.  If the\n  ``highlight`` `config option`_ is set and Pygments_ is installed, the source\n  code is highlighted.\n\n\n``interact``\n  Start an interactive interpreter whose global namespace contains all the\n  names found in the current scope.\n\n\n``display EXPRESSION``\n  Add an expression to the **display list**; expressions in this list are\n  evaluated at each step, and printed every time its value changes.\n  **WARNING**: since these expressions are evaluated multiple times, make sure\n  not to put expressions with side-effects in the display list.\n\n``undisplay EXPRESSION``:\n  Remove ``EXPRESSION`` from the display list.\n\n``source EXPRESSION``\n  Show the source code for the given function/method/class.\n\n``edit EXPRESSION``\n  Open the editor in the right position to edit the given\n  function/method/class.  The editor used is specified in a `config\n  option`_.\n\n``hf_unhide``, ``hf_hide``, ``hf_list``\n  Some frames might be marked as \"hidden\" by e.g. using the `@pdb.hideframe`_\n  function decorator.  By default, hidden frames are not shown in the stack\n  trace, and cannot be reached using ``up`` and ``down``.  You can use\n  ``hf_unhide`` to tell pdb to ignore the hidden status (i.e., to treat hidden\n  frames as normal ones), and ``hf_hide`` to hide them again.  ``hf_list``\n  prints a list of hidden frames.\n  The config option ``enable_hidden_frames`` can be used to disable handling\n  of hidden frames in general.\n\n\nSmart command parsing\n---------------------\n\nBy default, pdb tries hard to interpret what you enter at the command prompt\nas one of its builtin commands.  However, this is inconvenient if you want to\njust print the value of a local variable which happens to have the same name\nas one of the commands. E.g.::\n\n    (Pdb) list\n      1\n      2     def fn():\n      3         c = 42\n      4         import pdb;pdb.set_trace()\n      5  ->     return c\n    (Pdb) c\n\nIn the example above, instead of printing 42 pdb interprets the input as the\ncommand ``continue``, and then you lose your prompt.  It's even worse than\nthat, because it happens even if you type e.g. ``c.__class__``.\n\npdb++ fixes this unfriendly (from the author's point of view, of course :-))\nbehavior by always preferring the variable in scope, if it exists.  If you really\nwant to execute the corresponding command, you can prefix it with ``!!``.\nThus, the example above becomes::\n\n    (Pdb++) list\n      1\n      2     def fn():\n      3         c = 42\n      4         import pdb;pdb.set_trace()\n      5  ->     return c\n    (Pdb++) c\n    42\n    (Pdb++) !!c\n\nNote that the \"smart\" behavior takes place only when there is ambiguity, i.e.\nif there exists a variable with the same name as a command: in all other\ncases, everything works as usual.\n\nRegarding the ``list`` command itself, using ``list(\u2026`` is a special case\nthat gets handled as the Python builtin::\n\n    (Pdb++) list([1, 2])\n    [1, 2]\n\nAdditional functions in the ``pdb`` module\n------------------------------------------\n\nThe ``pdb`` module that comes with pdb++ includes all the functions and\nclasses that are in the module from the standard library.  If you find any\ndifference, please report it as a bug.\n\nIn addition, there are some new convenience functions that are unique to\npdb++.\n\n``pdb.xpm()``\n  eXtended Post Mortem: it is equivalent to\n  ``pdb.post_mortem(sys.exc_info()[2])``.  If used inside an ``except``\n  clause, it will start a post-mortem pdb prompt from the line that raised the\n  exception being caught.\n\n``pdb.disable()``\n  Disable ``pdb.set_trace()``: any subsequent call to it will be ignored.\n\n``pdb.enable()``\n  Re-enable ``pdb.set_trace()``, in case it was disabled by ``pdb.disable()``.\n\n.. _`@pdb.hideframe`:\n\n``@pdb.hideframe``\n  A function decorator that tells pdb++ to hide the frame corresponding to the\n  function.  Hidden frames do not show up when using interactive commands such\n  as ``up``, ``down`` or ``where``, unless ``hf_unhide`` is invoked.\n\n``@pdb.break_on_setattr(attrname, condition=always)``\n  class decorator: break the execution of the program every time the\n  attribute ``attrname`` is set on any instance of the class. ``condition`` is\n  a callable that takes the target object of the ``setattr`` and the actual value;\n  by default, it breaks every time the attribute is set. E.g.::\n\n      @break_on_setattr('bar')\n      class Foo:\n          pass\n      f = Foo()\n      f.bar = 42    # the program breaks here\n\n  If can be used even after the class has already been created, e.g. if we\n  want to break when some attribute of a particular object is set::\n\n      class Foo:\n          pass\n      a = Foo()\n      b = Foo()\n\n      def break_if_a(obj, value):\n          return obj is a\n\n      break_on_setattr('bar', condition=break_if_a)(Foo)\n      b.bar = 10   # no break\n      a.bar = 42   # the program breaks here\n\n  This can be used after ``pdb.set_trace()`` also::\n\n      (Pdb++) import pdb\n      (Pdb++) pdb.break_on_setattr('tree_id')(obj.__class__)\n      (Pdb++) continue\n\n\nConfiguration and customization\n-------------------------------\n\n.. _`config option`:\n\nTo customize pdb++, you can put a file named ``.pdbrc.py`` in your home\ndirectory.  The file must contain a class named ``Config`` inheriting from\n``pdb.DefaultConfig`` and override the desired values.\n\nThe following is a list of the options you can customize, together with their\ndefault value:\n\n``prompt = '(Pdb++) '``\n  The prompt to show when in interactive mode.\n\n``highlight = True``\n  Highlight line numbers and the current line when showing the ``longlist`` of\n  a function or when in **sticky mode**.\n\n``encoding = 'utf-8'``\n  File encoding. Useful when there are international characters in your string\n  literals or comments.\n\n``sticky_by_default = False``\n  Determine whether pdb++ starts in sticky mode or not.\n\n``line_number_color = pdb.Color.turquoise``\n  The color to use for line numbers.\n  See `Notes on color options`_.\n\n``filename_color = pdb.Color.yellow``\n  The color to use for file names when printing the stack entries.\n  See `Notes on color options`_.\n\n``current_line_color = \"39;49;7\"``\n  The SGR parameters for the ANSI escape sequence to highlight the current\n  line.  The default uses the default foreground (``39``) and background\n  (``49``) colors, inversed (``7``).\n  See `Notes on color options`_.\n\n``editor = None``\n  The command to invoke when using the ``edit`` command. By default, it uses ``$EDITOR``\n  if set, else ``vim`` or ``vi`` (if found).  If only the editor command is specified, the ``emacs`` and\n  ``vi`` notation will be used to specify the line number: ``COMMAND +n filename``. It's\n  otherwise possible to use another syntax by using the placeholders ``{filename}`` and\n  ``{lineno}``. For example with sublime text, specify ``editor = \"subl\n  {filename}:{lineno}\"``.\n\n``truncate_long_lines = True``\n  Truncate lines which exceed the terminal width.\n\n``enable_hidden_frames = True``\n  Certain frames can be hidden by default.\n  If enabled, the commands ``hf_unhide``, ``hf_hide``, and ``hf_list`` can be\n  used to control display of them.\n\n``show_hidden_frames_count = True``\n  If ``enable_hidden_frames`` is ``True`` this controls if the number of\n  hidden frames gets displayed.\n\n``def setup(self, pdb): pass``\n  This method is called during the initialization of the ``Pdb`` class. Useful\n  to do complex setup.\n\n``show_traceback_on_error = True``\n  Display tracebacks for errors via ``Pdb.error``, that come from\n  ``Pdb.default`` (i.e. the execution of an unrecognized pdb command),\n  and are not a direct cause of the expression itself (e.g. ``NameError``\n  with a command like ``doesnotexist``).\n\n  With this option disabled only ``*** exception string`` gets printed, which\n  often misses useful context.\n\n``show_traceback_on_error_limit = None``\n  This option sets the limit to be used with ``traceback.format_exception``,\n  when ``show_traceback_on_error`` is enabled.\n\nOptions relevant for source code highlighting (using Pygments)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n``use_pygments = None``\n  By default Pygments_ is used for syntax highlighting of source code when it\n  can be imported, e.g. when showing the ``longlist`` of a function or when in\n  **sticky mode**.\n\n``pygments_formatter_class = None``\n\n  You can configure the Pygments formatter to use via the\n  ``pygments_formatter_class`` config setting as a string (dotted path).\n  This should be one of the following typically:\n  ``\"pygments.formatters.Terminal256Formatter\"``,\n  ``\"pygments.formatters.TerminalTrueColorFormatter\"``, or\n  ``\"pygments.formatters.TerminalFormatter\"``.\n\n  The default is to auto-detect the best formatter based on the ``$TERM``\n  variable, e.g. it uses ``Terminal256Formatter`` if the ``$TERM`` variable\n  contains \"256color\" (e.g. ``xterm-256color``), but also knows about\n  e.g. \"xterm-kitty\" to support true colors (``TerminalTrueColorFormatter``).\n  ``TerminalFormatter`` gets used as a fallback.\n\n``pygments_formatter_kwargs = {}``\n\n  A dictionary of keyword arguments to pass to the formatter's constructor.\n\n  The default arguments (updated with this setting) are::\n\n      {\n          \"style\": \"default\",\n          \"bg\": self.config.bg,\n          \"colorscheme\": self.config.colorscheme,\n      }\n\n    ``style = 'default'``\n\n     The style to use, can be a string or a Pygments Style subclass.\n     E.g. ``\"solarized-dark\"``.\n     See http://pygments.org/docs/styles/.\n\n   ``bg = 'dark'``\n\n     Selects a different palette for dark/light backgrounds.\n     Only used by ``TerminalFormatter``.\n\n   ``colorscheme = None``\n\n     A dictionary mapping token types to (lightbg, darkbg) color names or\n     ``None`` (default: ``None`` = use builtin colorscheme).\n     Only used by ``TerminalFormatter``.\n\nExample::\n\n    class Config(pdb.DefaultConfig):\n        pygments_formatter_class = \"pygments.formatters.TerminalTrueColorFormatter\"\n        pygments_formatter_kwargs = {\"style\": \"solarized-light\"}\n\n.. _SGR parameters: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters\n\nNotes on color options\n^^^^^^^^^^^^^^^^^^^^^^\n\nThe values for color options will be used inside of the SGR escape sequence\n``\\e[%sm`` where ``\\e`` is the ESC character and ``%s`` the given value.\nSee `SGR parameters`_.\n\nThe following means \"reset all colors\" (``0``), set foreground color to 18\n(``48;5;18``), and background to ``21``: ``\"0;48;5;18;38;5;21\"``.\n\nConstants are available via ``pdb.Color``, e.g. ``pdb.Color.red``\n(``\"31;01\"``), but in general any string can be used here.\n\nCoding guidelines\n-----------------\n\n``pdb++`` is developed using Test Driven Development, and we try to keep test\ncoverage high.\n\nAs a general rule, every commit should come with its own test. If it's a new\nfeature, it should come with one or many tests which exercise it. If it's a\nbug fix, the test should **fail before the fix**, and pass after.\n\nThe goal is to make refactoring easier in the future: if you wonder why a\ncertain line of code does something, in principle it should be possible to\ncomment it out and see which tests fail.\n\nIn exceptional cases, the test might be too hard or impossible to write: in\nsuch cases it is fine to do a commit without a test, but you should explain\nvery precisely in the commit message why it is hard to write a test and how to\nreproduce the buggy behavior by hand.\n\nIt is fine NOT to write a test in the following cases:\n\n  - typos, documentation, and in general any non-coding commit\n\n  - code refactorings which do not add any feature\n\n  - commits which fix an already failing test\n\n  - commits to silence warnings\n\n  - purely cosmetic changes, such as change the color of the output\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "pdb++, a drop-in replacement for pdb",
    "version": "0.11.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/bretello/pdbpp/issues",
        "Source Code": "https://github.com/bretello/pdbpp"
    },
    "split_keywords": [
        "pdb",
        " debugger",
        " tab",
        " color",
        " completion"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "99e9704bbc08aace64fee536e4c2c20f63f64f6fdbad72938c5ed46c9723a9f1",
                "md5": "dd74cb87ed1474c93c06a78efec8fb89",
                "sha256": "51916b63693898cf4881b36b4501c83947758d73f582f1f84893662b163bdb75"
            },
            "downloads": -1,
            "filename": "pdbpp-0.11.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd74cb87ed1474c93c06a78efec8fb89",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 30545,
            "upload_time": "2025-07-18T09:36:01",
            "upload_time_iso_8601": "2025-07-18T09:36:01.478045Z",
            "url": "https://files.pythonhosted.org/packages/99/e9/704bbc08aace64fee536e4c2c20f63f64f6fdbad72938c5ed46c9723a9f1/pdbpp-0.11.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c64c118ef9534ac0632859b48c305d8c5dc9d6f963564fdfa66bc785c560247c",
                "md5": "d0b71ff38118f0e5d00f2aafa4103b70",
                "sha256": "cb6604ac31a35ed0f2a29650a8c022b26284620be3e01cfd41b683b91da1ff14"
            },
            "downloads": -1,
            "filename": "pdbpp-0.11.7.tar.gz",
            "has_sig": false,
            "md5_digest": "d0b71ff38118f0e5d00f2aafa4103b70",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 76026,
            "upload_time": "2025-07-18T09:36:02",
            "upload_time_iso_8601": "2025-07-18T09:36:02.781684Z",
            "url": "https://files.pythonhosted.org/packages/c6/4c/118ef9534ac0632859b48c305d8c5dc9d6f963564fdfa66bc785c560247c/pdbpp-0.11.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 09:36:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bretello",
    "github_project": "pdbpp",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "pdbpp"
}
        
Elapsed time: 1.64856s