dropping into the debugger on an exception

Jon Perez jbperez808 at yahoo.com
Wed Jun 9 13:33:04 EDT 2004


Thomas Heller wrote:

>>Just to be clear: you don't want this to happen all the time,
>>you want it to happen only with a particular script, yet you
>>don't want to modify that script at all?
> 
> I also don't understand *why* he wants to have it that way.

Just in case you missed the answer I gave earlier...

I don't even want this behaviour all the time with the same
script because end-users will be confused if they get dropped
into pdb.  Believe me, you don't want to explain what pdb is
to people who have a hard time even navigating via the
command prompt!

The best situation would be to be able to invoke this behaviour
only when I want it (i.e. during coding/debugging) and not have
to change anything (including sitecustomize.py) when I don't
want it around (the same machine might be used by both the
developer and the end-user).

Essentially, I believe this means being able to invoke the
script from within pdb and getting pdb to remain in itself
in case of an unanticipated exception (is that too much to ask?
:-D)  I want to be able to use pdb like other debuggers, i.e.
it's only active when I call a program under it, and also behave
like other debuggers which do not exit if an error occurs.



More information about the Python-list mailing list