source not displayed (linecache filename mismatch)
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 245
- Avg merge
- 13m
- Merged PRs (30d)
- 5
Description
I'm debugging a Python 3 script, which I typically invoke from the directory it lives in, as:
> ./fooBar.py parm1
If I instrument my script with a `set_trace()` call and start the script as above, it hits the breakpoint and stops. However, no source code is displayed. If, on the other hand, I enter the debugger from the command line, as:
> python3 -m pudb fooBar.py parm1
and _then_ hit continue, the source is displayed when I reach the `set_trace()` call.
Things to note:
* The filename is mixed case, as in my examples above.
* I am running this on Linux.
* The file is on a network storage device (netApp), not local to my Linux server.
* The linecache key for the filename in the non-working case is `./fooBar.py` as would be expected. Apparently, the filename used when looking up the file upon encountering the breakpoint is not exactly the same.
* If, instead of using the relative path to invoke the script from the command line (e.g., `./fooBar.py`), I use the absolute path (e.g., `$PWD/fooBar.py`), it hits the breakpoint and displays the source as it should.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.