Stop and go - two Python(Win) questions

Martin Bless m.bless at gmx.de
Wed Jan 16 17:24:00 EST 2002


[Simon Brunning <SBrunning at trisystems.co.uk>]:
>OK, try this:
>
>import pywin.debugger
>pywin.debugger.brk()

Great, thank you very much, it's exactly what I was looking for.  It
already helped with some distutils investigations. Here's how I use it
- looks very familiar to me and can easily be "grep'd":

#at beginning of module:
MBDEBUG = 1  # or 0
if MBDEBUG:
    from pywin.debugger import brk as set_step_on

#wherever I need a persistent breakpoint:

if MBDEBUG:
    set_step_on()

Now feeling much stronger when fighting bugs

Martin





More information about the Python-list mailing list