pdb.py - why is this debugger different from all other debuggers?

Mike Meyer mwm at mired.org
Thu Jan 5 20:34:18 EST 2006


rurpy at yahoo.com writes:
> "R. Bernstein" <rocky at panix.com> wrote:
>> So what I am suggesting is that it would be helpful to just follow an
>> existing debugger paradigm (or follow more closely) so folks don't
>> have to learn yet another interface.

Actually, you're not talking about changing the paradigm. You're
talking about minor tweaks to the command set.

> I was disappointed not to see any replies to this.
> I use pdb a lot because most of my debugging needs
> are simple, and I don't need/want the overhead or
> complications of a heavy duty gui debugger.

I don't use pdb a lot either - and I write a *lot* of Python. When
something goes wrong in Python, it tells you exactly what went wrong,
with which variable, and the file and line nubmer it went wrong at -
along with a backtrace telling you exactly how the code got
there. That's sufficient to track down most bugs you run into in
practice.  If not, rather than load the application into a debugger
and futz with that, it's simpler to fire up the interpreter, import
the module that is misbehaving, instantiate and experiment on the
classes with bogus behavior. If you write code that consists of
reasonably small methods/functions, these tools work *very* well for
chasing down bugs. That my development environment lets me go from
editing the class to testing the new code in the interpreter in a few
keystrokes means it's *very* easy to deal with.

Given those two tools, I find I use pdb maybe once a year. I probably
wouldn't miss it if it vanished. I'm certainly not going to spend any
time working on it. Of course, if you're interested in extending it
- have fun.

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list