How to use the pdbpp.post_mortem function in pdbpp

To help you get started, we’ve selected a few pdbpp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pdbpp / pdbpp / testing / test_pdb.py View on Github external
def fn():
        try:
            a = 1  # noqa: F841
            1/0
        except ZeroDivisionError:
            pdbpp.post_mortem(Pdb=PdbTest)
github pdbpp / pdbpp / testing / test_pdb.py View on Github external
def fn():
        def throws():
            0 / 0

        def f():
            throws()

        try:
            f()
        except:
            pdbpp.post_mortem(Pdb=PdbTest)
    check(fn, r"""
github pdbpp / pdbpp / testing / test_pdb.py View on Github external
def fn():
        def raises():
            raise Exception("foo")

        try:
            raises()
        except Exception:
            tb = sys.exc_info()[2]
            tb_ = tb
            while tb_:
                tb_.tb_frame.f_locals["__tracebackhide__"] = True
                tb_ = tb_.tb_next
            pdbpp.post_mortem(tb, Pdb=PdbTest)
        return 1