Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDB Integration #74

Open
Netroxen opened this issue Feb 1, 2019 · 0 comments
Open

PDB Integration #74

Netroxen opened this issue Feb 1, 2019 · 0 comments

Comments

@Netroxen
Copy link

Netroxen commented Feb 1, 2019

I'm currently using https://pypi.org/project/pdbpp/ as my debugger and was wondering if there's a way to hook better_exceptions into the .pdbrc.py file when a pdb statement or error occurs.

Any ideas on this..?

This is my current pdbrc configuration:

"""
This is an example configuration file for pdb++.
"""

import pdb


class Config(pdb.DefaultConfig):

    use_pygments = True
    disable_pytest_capturing = True
    stdin_paste = "epaste"
    filename_color = pdb.Color.lightgray
    use_terminal256formatter = False

    def __init__(self):
        try:
            from pygments.formatters import terminal
        except ImportError:
            pass
        else:
            self.colorscheme = terminal.TERMINAL_COLORS.copy()
            self.colorscheme.update(
                {
                    terminal.Keyword: ("darkred", "red"),
                    terminal.Number: ("darkyellow", "yellow"),
                    terminal.String: ("brown", "green"),
                    terminal.Name.Function: ("darkgreen", "blue"),
                    terminal.Name.Namespace: ("teal", "turquoise"),
                }
            )

    def setup(self, pdb):
        Pdb = pdb.__class__
        Pdb.do_l = Pdb.do_longlist
        Pdb.do_st = Pdb.do_sticky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant