Debugging a script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Graham Nicholls

    Debugging a script

    I've got a (python) program which crashes. WHat I'd like to do is something
    loke this:

    try:
    lots of stuff, or
    more pertinintly, the code which is failing
    except:
    drop in to the debugger

    So that I can print various things.

    Also, is there a way to display the line number - eg:
    except something:
    print ("DEBUG: exception %s at line number %s" % (sys.exc_type,
    sys.linenumber) )

    Thanks
    Python 2.3 (#1, Sep 11 2003, 14:36:40)
    --
    #include <wit>
Working...