I use Python with compiled Cython and Fortran extensions (wrapped using modern Fortran's iso_c_binding
module and Cython) for number crunching.
So far, I do not have a convenient debugging strategy. I use pudb
for the Python part. Although I might be able to use gdb on the Cython&Fortran parts of the project, I find myself to be using console text output (print()!
) instead.
I'd like to know if there are tools that make the different levels of code transparent for debugging, i.e. I'm looking for a "one-tool-debugs-it-all" solution that doesn't care whether it steps Python, Cython or Fortran code.
I'd prefer tools that allow user-friendly interaction, such as the aforementioned pudb. Does such a jack of all trades debugging tool exist? Is the Python mode of GDB
the best I can get?
You can use the Cython debugger which extends gdb
with new commands that begin cy
. These let you step through Cython code, set breakpoints, inspect locals etc. and still work just like the py
commands from GDB's Python mode when you happen to be in a Python frame. There's no Fortran support unfortunately.
You can try free PTVS + trial Intel Fortran + mixed mode debugging
see also
http://pytools.codeplex.com/wikipage?title=Mixed-mode%20debugging http://pytools.codeplex.com/workitem/1974
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With