This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hexagonrecursion
Recipients hexagonrecursion
Date 2020-11-17.07:46:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The first entry in sys.path is different between `python` and `python -m pdb`. In the former it is the absolute path to the parent directory of while in the later it is a relative path (unless the debug target was specified using an absolute path). The meaning of the absolute path does not change when the current directory changes (e.g. via os.chdir()) while the meaning of the relative path does. Like any environment inconsistency between regular program execution and the debugger this may lead to bugs that mysteriously vanish when you try to debug them.

$ cat >
import sys
from pprint import pprint

$ python3 
$ python3 -m pdb                                  
> /home/user/<module>()
-> import sys
(Pdb) c
Date User Action Args
2020-11-17 07:46:41hexagonrecursionsetrecipients: + hexagonrecursion
2020-11-17 07:46:41hexagonrecursionsetmessageid: <>
2020-11-17 07:46:41hexagonrecursionlinkissue42384 messages
2020-11-17 07:46:41hexagonrecursioncreate