How to install Python-compatible GDB on Windows 7

I need to debug cython code. The official documentation says that I need to install "gdb 7.2 or higher, built with Python support." Unfortunately, I did not find a step-by-step guide on how to install it on Windows 7. Do I have to create it myself (how?) Or does the installer for Windows 7, 64 bit already exist? Any help would be greatly appreciated.

I am using Windows 7, Python 2.7 64bit and Visual Studio 2008.

Suggestions are also welcome for alternative methods of debugging cython (especially regarding non-console visual debuggers). Thanks in advance for your help!

+6
python debugging windows-7 cython gdb
Sep 20 '13 at 8:48
source share
1 answer

As with all GNU projects, GDB is provided as source code. The good news is that this means that it can be built to work on almost any platform. The bad news is that if someone has not already defined a process for you, you must do it yourself. GDB will be provided built-in for almost any Linux distribution, but with Windows you yourself.

Basically you have three options:

  • Move development (or at least debugging) to Linux. It is not as difficult as it seems. You can easily run Linux inside a virtual machine inside Windows using VirtualBox , which is free GPL software.

  • Debug using the Cygwin shell inside windows. Cygwin is free under the GPL and allows you to run a Linux-like environment on Windows. It includes most of the GNU software, including the latest version of GDB .

  • If you feel particularly adventurous, you can try to compile GDB yourself to work with your Windows system. This is by far the most difficult route, and only for those who are familiar with programming on Windows platforms.

In the end, I highly recommend using Linux for any serious Python development, especially when using Python extensions that don't have large developer communities.

0
Dec 08 '14 at 2:08
source share



All Articles