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 9 7167
[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****@ActiveState.com
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/
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_args = ['/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
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_args = ['/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
<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
> 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****@ActiveState.com
<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
<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
[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****@ActiveState.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |