Python Forum
How to debug high-performance additives written in C ++ code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to debug high-performance additives written in C ++ code?
#1
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.
Reply
#2
A concrete example of how you link python to C++ would help...
Reply
#3
(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.
Reply
#4
What about the Cython chapter about Debugging your Cython program?
Reply
#5
(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.
Reply
#6
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)?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  this message show up for me. cant debug notinhg here davidthomas 0 622 Jun-29-2023, 05:44 PM
Last Post: davidthomas
  Python performance Jacques 4 2,280 Jun-23-2020, 01:03 PM
Last Post: GaryNR
  steps to debug regular expressions Skaperen 3 1,809 Oct-22-2019, 10:04 PM
Last Post: Skaperen
  performance time Skaperen 2 2,215 Apr-13-2019, 08:29 PM
Last Post: Skaperen
  How in Eclipse recognize debug / run mode? AlekseyPython 1 2,179 Mar-21-2019, 08:26 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020