Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Setting breakpoints on CPython native code is a PITA and can’t be done (afaik) from PDB.


Doesn't b do the trick for you ?

b(reak) [ ([filename:]lineno | function) [, condition] ] Without argument, list all breaks.

        With a line number argument, set a break at this line in the
        current file.  With a function name, set a break at the first
        executable line of that function.  If a second argument is
        present, it is a string specifying an expression which must
        evaluate to true before the breakpoint is honored.

        The line number may be prefixed with a filename and a colon,
        to specify a breakpoint in another file (probably one that
        hasn't been loaded yet).  The file is searched for on
        sys.path; the .py suffix may be omitted.


This breaks on Python code, not CPython native (C) code




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: