Assuming that you are writing a compiled Python module (ie. that compiles into a .dll
.so
or .dynlib
..) in C/C++,
here are tips to setup real-time debugging, both with your own C/C++ source code and within Python's C source.
Instructions here are for Linux only. You should find your way for any different OS..
- have your compiled module (with no optimization -O0 and debug symbols -g) is available in your current (virtual environment):
- for this, make a wheel for your project and load it in your virtual environment
- OR compile your project as a .so only and make sure you set LD_LIBRARY_PATH= to the directory where your .so is located
- test your proper module loading: