Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

How exactly can I debug Cython with breakpoints?

$
0
0

I have a large python codebase which I converted and compiled into cython modules. I now run the main function of my cython codebase using a python wrapper script file. In command line I run:

python wrapper.py args

where wrapper.py is composed of:

import sysfrom cython_main_module import main_functionif __name__ == '__main__':    args_to_parse = sys.argv[1:]    main_function(args_to_parse)

I have installed GDB using msys64 (btw i'm using Windows 10), but I do not know how to go about actually putting a breakpoint in one of the cython modules (i.e. a .pyx file which is where the code is) and then debug a configuration. Or, indeed, how to set this up. Further to this question, would it be possible to apply this debugger to a code editor, similar to how one is able to debug python using Pycharm. Thank you in advance.

I have tried starting python in the gdb, but I am struggling to start a particular python executable; I need to run python from the virtual environment in my project. I do not know how to do this in GDB mode.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>