PySnooper icon indicating copy to clipboard operation
PySnooper copied to clipboard

Snoop recursively, but only in my code.

Open guettli opened this issue 3 years ago • 2 comments

Hi,

I would like to trace the http request handling of Django in my development environment.

But I am sure that the bug is in my code, not in the code of Django.

I would like to see every line of my code, excluding Django, standard library and other libraries.

I had a look at the arguments which snoop() accepts, but I think it is not possible up to now.

Would you accept a PR which implements this?

Do you have a hint how to implement this?

guettli avatar Mar 14 '22 10:03 guettli

This is a good idea. How would you propose an API for that would look like? I have some thoughts but I want to hear yours first.

@alexmojaki If you'll have any opinion about this, I'll be happy to hear it.

cool-RR avatar Mar 14 '22 11:03 cool-RR

Link to the equivalent issue: https://github.com/alexmojaki/snoop/issues/51

To do something similar now In PySnooper I think you'd have to override Tracer._is_internal_frame.

alexmojaki avatar Mar 14 '22 20:03 alexmojaki