py-spy
py-spy copied to clipboard
py-spy fails to find native source files when package installed as "development" option
I'm developing a mixed (C and PY) python extension.
In order to speed up development, I do install the PY files into site-packages of my venv: so I use pip install -e .
. If I do so, py-spy fails to follow the link to the (C) source files and the symbols of my native code are not displayed in the flamegraph
I had a similar problem, and I solved it by adding --no-build-isolation
and --no-deps
to the pip install
such that the compilation of your package relies on the C modules actually installed in your venv
(which I imagine you compiled with debug symbols) instead of re-building everything in a sandbox. If you do this, you should pre-install everything that is required.