Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set breakpoints if CWD is on a read-only FS #25

Open
abliss opened this issue Apr 25, 2020 · 3 comments
Open

Cannot set breakpoints if CWD is on a read-only FS #25

abliss opened this issue Apr 25, 2020 · 3 comments

Comments

@abliss
Copy link
Contributor

abliss commented Apr 25, 2020

Something underneath the breakpoint mechanic appears to create a file called .coverage, and if this fails, the breakpoint cannot be set.

The file does not seem to actually be required, though: by editing the code to skip it, I am able to set breakpoints successfully. So, the creation of the file ought to be optional; failure to create it should probably not be fatal.

@rocky
Copy link
Collaborator

rocky commented Apr 25, 2020

I am not aware of anything in the code I wrote that does this. However the debugger uses pyficache and that uses Ned Batchelder's coverage in order to figure out which line numbers are stoppable.

I also think this is a recent thing since I've not encountered it in the past.

So if you are up to it, perhaps you can look at coverage to see under what conditions it creates a .coverage file and how that can be ignored/avoided.

The fix would probably be in the pyficache project.

@abliss
Copy link
Contributor Author

abliss commented Apr 26, 2020

Yes, the issue appears to be in the way pyficache calls coverage.. I'm trying to figure out if there's a config that can be set in trepan3k to avoid the issue. If not, I'll try contacting those maintainers.

For now, in case anyone needs it, my workaround is to manually set data_file to None here: https://github.com/nedbat/coveragepy/blob/fd43e3509f559c55b61f92dacbd524cd42941b06/coverage/control.py#L182

@rocky
Copy link
Collaborator

rocky commented May 22, 2020

I've revised pyficache so it no longer uses coverage. Release 1.0.1 I believe will no longer create the .coverage directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants