Menu

#431 break for exception

open
nobody
None
5
2010-03-15
2010-03-15
No

I have found the attached patch useful to get debugger breakpoint functionality upon an uncaught exception.
This belongs under https://sourceforge.net/tracker/index.php?func=detail&aid=1008443&group_id=85796&atid=577332
(the new artifact is so I can attach a file).

notes:
it's very crude (eg assigning to findFrame)
it only works for debug launches
no UI support such as enable/disable this behaviour

Discussion

  • Bobby Hesselbo

    Bobby Hesselbo - 2010-03-15

    patch to pydevd.py

     
  • Bobby Hesselbo

    Bobby Hesselbo - 2010-03-16

    self-contained example (run under debugger)

     
  • Bobby Hesselbo

    Bobby Hesselbo - 2010-03-16

    added the script break_except.py which shows the functionality without patching pydev (needs to be run from pydev debugger)

     
  • Sorin Sbarnea (old)

    this is a must for anyone doing debugging.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-07-14

    Just did an initial implementation (no UI for now).

    The api to use it is:

    import pydevd
    pydevd.set_pm_excepthook()

    or passing the exceptions. i.e.:

    set_pm_excepthook((IndexError, AssertionError))

    This should work when launched in the debugger.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-07-14

    Note: available in the current nightly (version 1.6.0)

     
  • Anonymous

    Anonymous - 2010-12-28

    fantastic! had being waiting for such a long time.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.