[New-bugs-announce] [issue1254] pdb fails to launch some script.

Romain JACQUET report at bugs.python.org
Wed Oct 10 16:02:30 CEST 2007

New submission from Romain JACQUET:

Pdb fails to launch any scripts that uses the __file__ builtin.
This problem occurs because pdb does not set the global environnement

It can be corrected by setting the global variable __file__ before pdb
executes the file.

Replace : globals_ = {"__name__" : "__main__"} 
by: globals_ = {"__name__" : "__main__", "__file__": filename}

The problem happens also in python 2.5.

components: Library (Lib)
files: bug.py
messages: 56312
nosy: romain_jacquet
severity: normal
status: open
title: pdb fails to launch some script.
type: behavior
versions: Python 2.4

Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.py
Type: text/x-python
Size: 753 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071010/a9e1a979/attachment.py 

More information about the New-bugs-announce mailing list