Trace your Python process line by line with minimal overhead
github.com
github.com
Not sure if there’s a way to address this kind of issue. Or if it’s common elsewhere? Just this experience of “what I wrote is being run in the context of some library internals and so it spits out the internals.”
Disadvantages - To trace the process, Python must be configured with the --with-dtrace option. Otherwise, you won't be able to trace it.
For those that find this interesting, you might also like pysnooper - I use it all the time.
https://github.com/cool-RR/PySnooper
https://python.plainenglish.io/pysnooper-stop-debugging-pyth...