Pdb fails to launch any scripts that uses the __file__ builtin. This problem occurs because pdb does not set the global environnement correctly. It can be corrected by setting the global variable __file__ before pdb executes the file. Lib/pdb.py: Replace : globals_ = {"__name__" : "__main__"} by: globals_ = {"__name__" : "__main__", "__file__": filename} The problem happens also in python 2.5.