6

I need to debug cython code. Official documentation says, I need to install "gdb 7.2 or higher, built with Python support". Unfortunately I didn't find any step-by-step guide how to install it on Windows 7. Do I have to build it myself (how?) or there already exists an installer for Windows 7, 64 bit? Any help would be greatly appreciated.

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

Also suggestions about alternative ways to debug cython (especially concerning non-console visual debuggers) are welcome. Thanks in advance for your help!

Apogentus
  • 6,371
  • 6
  • 32
  • 33
  • 1
    Your best bet is to install Python(x,y). It has Cython and `gdb-python27` all bundled together. But I've failed to use `cygdb` anyway. You can try playing with it by yourself. My suggestion is that you should get a linux box, either using VirtualBox or get a real linux machine and debug your code. It would be far more easier. – jagttt Feb 26 '14 at 13:20
  • @jagttt I installed Python(x,y) (full), now where do I find gdb-python27? There are no results when searching in the installation folder or at c:/python27 for it. – xamid Sep 10 '16 at 18:18

1 Answers1

-1

As with all GNU projects, GDB is provided as source code. The good news is that this means it can be built to run on practically any platform. The bad news is that, unless someone has already figured the process out for you, you have to do it yourself. GDB will be provided built-in on virtually any Linux distribution, but with Windows you're on your own.

You basically have three options:

  1. Move development (or at least debugging) over to Linux. This isn't as hard as it sounds. You can easily run Linux within a virtual machine inside Windows using VirtualBox, which is free software under GPL.

  2. Do debugging using a Cygwin shell inside windows. Cygwin is free under the GPL and allows you to run a Linux-like environment in Windows. It includes most of the GNU software, including the latest release of GDB.

  3. If you're feeling particularily adventurous, you could try to compile GDB yourself to work on your Windows system. This is by far the hardest route, and only for someone familiar with programming on Windows platforms.

In the end, I would strongly recommend using Linux for any serious Python development, especially when using Python extensions that do not have large developer communities.

lstyls
  • 173
  • 2
  • 13