-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Learning Cython Programming (Second Edition) - Second Edition
By :
To debug Cython, you need GDB >= 7.0. On Mac OS X Xcode, build tools have moved to LLVM and lldb as respective debuggers. You can install gdb using homebrew:
$ brew install gdb
We cannot use the Python debugger since the Cython code is compiled down to C/C++. Therefore, when debugging without the Cython plugin, you will be stepping through the generated C/C++ code, which won't be helpful as it won't understand the context of the Cython program.
Cygdb is installed as a part of Cython and is a wrapper over GDB (it invokes GDB with arguments to set up the Cython plugin). Before you can debug the Cython code, we need to generate the debugging information. Just like C/C++, we need to specify compiler options to generated debuggable code we can pass –gdb when invoking the Cython compiler:
$ cython --gdb cycode.pyx
Before you start debugging on Debian, you need to install the Python debug information package and GDB as it is not installed...
Change the font size
Change margin width
Change background colour