pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Breakpoint on file access

Open techtonik opened this issue 4 years ago • 5 comments

I am trying to figure out who creates certain files (requires.txt) during python setup.py sdist and breaking on file access would be awesome. Does pudb provide such option?

techtonik avatar Sep 04 '19 07:09 techtonik

In the meanwhile I am using this:

$ strace -e trace=file python -m trace --trace setup.py sdist &> fulltrace.log

techtonik avatar Sep 04 '19 07:09 techtonik

Not out of the box, no. But I imagine something monkey-patch-y could be hacked up that calls pudb.set_trace() on (e.g.) calls to open.

inducer avatar Sep 04 '19 14:09 inducer

Maybe there is a way to set a dynamic breakpoint on when any variable content becomes "requires.txt"? That could help too.

techtonik avatar Sep 05 '19 13:09 techtonik

I don't know that bdb can even do that, sorry.

inducer avatar Sep 05 '19 14:09 inducer

Also related to https://github.com/inducer/pudb/issues/65. I don't know if it's an easy thing to implement.

asmeurer avatar Sep 05 '19 17:09 asmeurer