Python Forum

Full Version: How to debug high-performance additives written in C ++ code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Python 3.7.5

To speed up my code, I decided to write a small C++ computing kernel and use this so-library from Python. But the question arises of debugging this "two-level" system: how can I use the IDE to get the transferred values from the python to C++ code, observe the change of variables and return the processed data to the Python?

Thank you in advance for your help.

p.s. I tried using Numba, Pypy and Cython, but they all didn't fit in for one reason or another.
A concrete example of how you link python to C++ would help...
(Nov-11-2019, 12:14 PM)Gribouillis Wrote: [ -> ]A concrete example of how you link python to C++ would help...

I wrote the program using Cython, but I didn't like this approach (there is also no debugging). Therefore, at the moment I don't have a two-level program (C++ and Python). But most likely I will import the C++ library using Cython.

I need to find an approach and at this moment I don’t understand how to debug such two-level system.
What about the Cython chapter about Debugging your Cython program?
(Nov-11-2019, 12:44 PM)Gribouillis Wrote: [ -> ]What about the Cython chapter about Debugging your Cython program?

I am very confused by this sentence: "For Python 3, code should be built with Python 3 and the debugger should be run with Python 2 (or at least it should be able to find the Python 2 Cython installation)".

And this debugging scheme looks so complicated, that it most likely willn't work. Yes, and I didn't like the Cython language, I want to take classic C++ language.
I installed the Cython- debugger according to the instructions from the official site. Everything was successfully installed, and my files with the Cython- code were successfully compiled into dynamic libraries.

How can I debug Cython- code using Eclipse (of other IDE)?