473,657 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python debug libraries

I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.

thanks,
-robert
Jul 18 '05 #1
9 7183
[Robert Ferrell wrote]
I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.


If you are using the ActivePython distribution the debug libraries are
made available in a separate package here:
ftp://ftp.activestate.com/ActivePython/etc/

For example the debug libs for ActivePython 2.3.2 are:
ActivePython-2.3.2-230-win32-ix86.debug.zip

Cheers,
Trent

--
Trent Mick
Tr****@ActiveSt ate.com

Jul 18 '05 #2
See my recent post...

http://groups.google.ca/groups?q=deb...hon.org&rnum=2

(all one line). You probably don't want to debug *everything*, just
your particular extension, and this recipe allows that fairly readily
w/out requiring getting every single dependency built against debug
Python (which can be a royal PITA).

HTH,
Mike

Robert Ferrell wrote:
I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.

thanks,
-robert

_______________ _______________ _________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/


Jul 18 '05 #3
Mike C. Fletcher wrote:
See my recent post...

http://groups.google.ca/groups?q=deb...hon.org&rnum=2
(all one line). You probably don't want to debug *everything*, just
your particular extension, and this recipe allows that fairly readily
w/out requiring getting every single dependency built against debug
Python (which can be a royal PITA).

HTH,
Mike

Robert Ferrell wrote:
I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.

thanks,
-robert

_______________ _______________ _________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/


in our company, we do not link to debug third party libraries. i'm embedding python (using visual studio) and run into
the same problem. we now resort to undef'ing _DEBUG before including the python header files and everything works
correctly. if you look in the python header files, you will see that when _DEBUG is defined, there is a #pragma to link
to pythonXX_d.lib. when _DEBUG is not defined it will link to pythonXX.lib. other's may disagree about this approach,
but so far it works well and we don't have any memory problems at all.

for extensions using distutils here's another option which i prefer, since you can do this on a case-by-case basis
instead of modifiying msvccompiler.py :

add this line to setup in your setup.py file:

extra_compile_a rgs = ['/Od /Z7'],
extra_link_args = ['/DEBUG'],

since these options will be placed after the compile/link options that distutils uses, these options will be used,
overriding the options in msvccompiler.py .

bryan

Jul 18 '05 #4
Mike C. Fletcher wrote:
See my recent post...

http://groups.google.ca/groups?q=deb...hon.org&rnum=2
(all one line). You probably don't want to debug *everything*, just
your particular extension, and this recipe allows that fairly readily
w/out requiring getting every single dependency built against debug
Python (which can be a royal PITA).

HTH,
Mike

Robert Ferrell wrote:
I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.

thanks,
-robert

_______________ _______________ _________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/


in our company, we do not link to debug third party libraries. i'm embedding python (using visual studio) and run into
the same problem. we now resort to undef'ing _DEBUG before including the python header files and everything works
correctly. if you look in the python header files, you will see that when _DEBUG is defined, there is a #pragma to link
to pythonXX_d.lib. when _DEBUG is not defined it will link to pythonXX.lib. other's may disagree about this approach,
but so far it works well and we don't have any memory problems at all.

for extensions using distutils here's another option which i prefer, since you can do this on a case-by-case basis
instead of modifiying msvccompiler.py :

add this line to setup in your setup.py file:

extra_compile_a rgs = ['/Od /Z7'],
extra_link_args = ['/DEBUG'],

since these options will be placed after the compile/link options that distutils uses, these options will be used,
overriding the options in msvccompiler.py .

bryan
Jul 18 '05 #5
<quote who="Trent Mick">
[Robert Ferrell wrote]
I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.


If you are using the ActivePython distribution the debug libraries are
made available in a separate package here:
ftp://ftp.activestate.com/ActivePython/etc/

For example the debug libs for ActivePython 2.3.2 are:
ActivePython-2.3.2-230-win32-ix86.debug.zip


I haven't been using ActivePython because I've been using the Enthought
distribution, which includes all the SciPy stuff. Is there any reason
these should be mutally exclusive (they are the same Python version)? Can
I just install ActivePython overtop of another Python distribution?

thanks,
-robert

Jul 18 '05 #6
> I haven't been using ActivePython because I've been using the Enthought
distribution, which includes all the SciPy stuff. Is there any reason
these should be mutally exclusive (they are the same Python version)? Can
I just install ActivePython overtop of another Python distribution?


You could _try_. :) No guarantees because we certainly don't test that.
ActivePython is fully binary compatible with python.org's Python and I
would presume with Enthought's distro as well, so it should basically
work. You might run into trouble when you start trying to uninstall
everything, though.

Trent

--
Trent Mick
Tr****@ActiveSt ate.com

Jul 18 '05 #7
<quote who="Trent Mick">
[Robert Ferrell wrote]
I'm trying to do some debugging of python extensions on Windows2K. MS
Visual Studio (.NET) says it can't find the debug version of the
python libraries. (The message is "python.exe does not contain any
debugging information".) I installed the binaries from the Windows
installer. How should I get the debug libraries? Or is that even
what I need? I'm kind of new to Windows, and Visual Studio in
particular, so maybe I'm way off base.


If you are using the ActivePython distribution the debug libraries are
made available in a separate package here:
ftp://ftp.activestate.com/ActivePython/etc/

For example the debug libs for ActivePython 2.3.2 are:
ActivePython-2.3.2-230-win32-ix86.debug.zip


Okay, I installed ActivePython and the debug libraries. I'm also using
ActiveState's Visual Python. I have a Python driver script which calls
into my Python extension (written in C). How do I get the debugger to
break in the Python script, and then later in my C code? I can get it to
do one or the other by changing which is the "Startup Project". But when
I'm debugging I really need both.

Thanks,
-robert

Jul 18 '05 #8
<quote who="Mike C. Fletcher">
See my recent post...

http://groups.google.ca/groups?q=deb...hon.org&rnum=2

(all one line). You probably don't want to debug *everything*, just
your particular extension, and this recipe allows that fairly readily
w/out requiring getting every single dependency built against debug
Python (which can be a royal PITA).


I read the post, thanks. Now I have a very novice question. When is
msvccompiler.py used? If I'm building my Python extensions in a MS Visual
Studio project, is that script used?

thanks,
-robert

Jul 18 '05 #9
[Robert Ferrell wrote]
I read the post, thanks. Now I have a very novice question. When is
msvccompiler.py used? If I'm building my Python extensions in a MS Visual
Studio project, is that script used?


I am no expert on distutils but that module is a part of the distutils
and is called by the distutils framework _iff you are using distuils to
build your Python extension_.

http://aspn.activestate.com/ASPN/doc...dist/dist.html

Trent

--
Trent Mick
Tr****@ActiveSt ate.com

Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
6368
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
0
2267
by: peter | last post by:
Hello all, I would like to debug my python libraries, written in c++, with GDB (gnu debugger) I'm using the mingw compiler in a windows environment. As development environment I use eclipse with the CDT plugin. This plugin also has a nice GUI frontend for the GDB. I've already tried several setups, no setup seemed to work.
1
1625
by: AndyL | last post by:
Hi, let me describe how I do that today. There is standard python taken from python.org installed in a c:\python23 with at least dozen different additional python packages (e.g. SOAPpy, Twisted, wx, many smaller ones etc) included. Also python23.dll moved from c:\windows to c:\python23. This is zipped and available as over 100MB file to anyone to manually unzip on his/her PC. This is a one time step. On top of that there is 30K lines...
852
28326
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for my general education. Mark
0
1204
by: Simon Eves | last post by:
I am trying to write a Python module to embed the functionality of Maya (the 3D modelling and animation application from Autodesk, formerly Alias) for doing scripted scene manipulation and rendering processes in Python. I am aware of the CGKit project, which does this and a lot more, but it is over-complex for our needs, and also does not work in the context of a pure command-line Python script, only as an alternative scripting language...
5
2656
by: danfike | last post by:
Hi all, So I'm working on a C++ application that will eventually embed or extend Python using Boost.Python, but I first need to get Python compiled correctly for my platform. I've got a Windows Vista 64-bit machine with a Core 2 processor, and I'm compiling with a VC8. I downloaded the Python 2.5.1 source from python.org, and I opened the Visual Studio solution file that was in the PCbuild8 directory. I created a new x64 platform and...
0
1552
by: Ling | last post by:
I am using boost.python to wrap C++ function which includes directmusic libraries to simply play the midi, but lots of linkage errors "error LNK2001: unresolved external symbol". I wonder if it is possible to work with DirectX - directmusic libs. Are there any ways to wrap it? *********************compilation errors ************************* msvc.link.dll bin\msvc-7.1\debug\threading-multi\playmusic.pyd bin \msvc-7.1\debu...
0
154
by: inhahe | last post by:
"inhahe" <inhahe@gmail.comwrote in message news:... Actually, I was under the impression that the socket module relied on one of the external libraries to work, since it didn't work when I compiled it. But reading the readme again I realized that the socketmodule is supposed to compile out of the box. So I compiled Python again on VS2005 instead of 2008 (the error I posted that didn't work on 2008 or 2005 was trying to compile one of...
3
6783
by: Bev in TX | last post by:
I am a complete newbie at building Python. I am trying to build it under MS Windows Vista (64-bit AMD) with MS VS2005. I'm doing that because I need debug libraries, which I did not see in the standard distribution. I downloaded the source and found the MSVS8 solution/project files. However, when I tried to build it I got the following error: ....\python-2.5.2\modules\_sqlite\connection.h(33) : fatal error C1083: Cannot open include...
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.