Search code examples
pythondebuggingwinpdb

Programmatically disable "trap unhandled exceptions" mode in winpdb


I am using winpdb to debug a python script. I would like to turn off the "trap unhandled exceptions" mode by default. Manually attaching the winpdb debugger and clicking the lightning button on every restart is too much work.

Ideally I would do something like this at the beginning of my script

import rpdb2;
rpdb2.start_embedded_debugger('password', timeout=0, trap_unhandled=False)

But unfortunately the trap_unhandled argument doesn't exist.

How can I accomplish this?


Solution

  • This seems to work:

    import rpdb2; rpdb2.start_embedded_debugger('mypassword')
    rpdb2.g_debugger.set_trap_unhandled_exceptions(False)