[Patches] [ python-Patches-896011 ] pdb enhancements and bug fixes

SourceForge.net noreply at sourceforge.net
Thu Feb 12 15:07:57 EST 2004


Patches item #896011, was opened at 2004-02-12 12:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=896011&group_id=5470

Category: Demos and tools
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Ilya Sandler (isandler)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb enhancements and bug fixes

Initial Comment:

Bug fixes

B1) Execute script in its own namespace

(script was executed in pdb.py name space. E.g one
could do 
print line_prefix 
in your script and one would get pdb's line_prefix variable
(and I guess if was  possible to accidentally stomp on
pdb internals from the script))

B2)  Remove pdb.py's path from sys.path.

(pdb.py path was not removed from sys.path.. While
normally this is not a  problem, it CAN cause hard to
diagnose problems.  e.g. if your script needs to
override some of std modules and you put them in some
location and set PYTHONPATH accordingly, then
everything works without
pdb, but when you run under pdb (which is normally
located with the rest of python std libs) your
overriding suddenly breaks)

This addresses CVS Bug report #751124, part 2

B3)  Fix handling of breakpoints "file_name:line_no"

(pdb was failing to set the breakpoint specified as 
"b file_name:100"
when file_name did not end with ".py", and was not an
absolute path.This is quite bad as many scripts
commonly do not have ".py" suffix...
In at least some cases, (e.g when running under emacs
gud)  user can't workaround this problem, as the
"break" command is issued by another program..)



Enhancements:

E1) Now pdb gets directly to the 1st line of script 

(the CVS version of pdb required doing "step" twice
before you get to the first line of your code: both
ugly and annoying)

E2) Restart the program (and preserve debugger state,
such as breakpoints) if program being debugged exits 

(CVS version was exitting on program's exitNow debugger
does not die on script's exit, taking all the settings
with it)

E3) Enter post-mortem debugging if the program throws an
uncaught exception

(CVS version was simply dying in this case
This addresses CVS bug report #751124, part 1)

All changes apply to the command line interface of pdb.py
Ie. only when pdb.py invoked as
"pdb.py script"

The only exception is B3 which fixes a bug in do_break()


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=896011&group_id=5470



More information about the Patches mailing list