python pdb not breaking in files properly?

Posted by YGA on Stack Overflow See other posts from Stack Overflow or by YGA
Published on 2009-10-16T05:39:53Z Indexed on 2010/04/14 0:13 UTC
Read the original article Hit count: 670

Filed under:
|

Hi Folks,

I wish I could provide a simple sample case that occurs using standard library code, but unfortunately it only happens when using one of our in-house libraries that in turn is built on top of sql alchemy.

Basically, the problem is that this break command:

(Pdb) print sqlalchemy.engine.base.__file__
/prod/eggs/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/engine/base.py

(Pdb) break /prod/eggs/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/engine/base.py:946

Is just being totally ignored, it seems, by pdb. As in, even though I am positive the code is being hit (both because I can see log messages, and because I've used sys.settrace to check which lines in which files are being hit), pdb is just not breaking there.

I suspect that somehow the use of an egg is confusing pdb as to what files are being used (I can't reproduce the error if I use a non-egg'ed library, like pickle; there everything works fine).

It's a shot in the dark, but has anyone come across this before?

Thanks, /YGA

© Stack Overflow or respective owner

Related posts about python

Related posts about pdb-python