How to install GDB with Python support on Windows 7

2024/10/18 15:01:58

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!

Answer

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.

https://en.xdnf.cn/q/72798.html

Related Q&A

Pip3 is unable to install requirements.txt during docker build

I am using docker tutorial (https://docs.docker.com/language/python/build-images/) to build a simple python app. Using freeze command I made requirements.txt file which consists a lot of packages. When…

__del__ at program end

Suppose there is a program with a couple of objects living in it at runtime.Is the __del__ method of each object called when the programs ends?If yes I could for example do something like this:class C…

PySpark groupby and max value selection

I have a PySpark dataframe likename city datesatya Mumbai 13/10/2016satya Pune 02/11/2016satya Mumbai 22/11/2016satya Pune 29/11/2016satya Delhi 30/11/2016panda Delhi 29/11/2016…

Nesting descriptors/decorators in python

Im having a hard time understanding what happens when I try to nest descriptors/decorators. Im using python 2.7.For example, lets take the following simplified versions of property and classmethod:clas…

Retrieve definition for parenthesized abbreviation, based on letter count

I need to retrieve the definition of an acronym based on the number of letters enclosed in parentheses. For the data Im dealing with, the number of letters in parentheses corresponds to the number of w…

Python (Watchdog) - Waiting for file to be created correctly

Im new to Python and Im trying to implement a good "file creation" detection. If I do not put a time.sleep(x) my files are elaborated in a wrong way since they are still being "created&q…

How do I display add model in tabular format in the Django admin?

Im just starting out with Django writing my first app - a chore chart manager for my family. In the tutorial it shows you how to add related objects in a tabular form. I dont care about the related obj…

Python Matplotlib - Impose shape dimensions with Imsave

I plot a great number of pictures with matplotlib in order to make video with it but when i try to make the video i saw the shape of the pictures is not the same in time...It induces some errors. Is th…

Move x-axis tick labels one position to left [duplicate]

This question already has answers here:Aligning rotated xticklabels with their respective xticks(6 answers)Closed last year.I am making a bar chart and I want to move the x-axis tick labels one positio…

PUT dictionary in dictionary in Python requests

I want to send a PUT request with the following data structure:{ body : { version: integer, file_id: string }}Here is the client code:def check_id():id = request.form[id]res = logic.is_id_valid(id)file…