473,772 Members | 3,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to debug python's extend module written in c/c++ on windows

dear all:

I have searched the debug informations of many python's IDE, but I
cannot find the method about debuging the extend module written in
Visual studio 2008 on windows.
The wingIDE tell me that we can debug the extend module on linux, but
cannot on windows. and using wingdbstub.py we can embed python into
other's source code but not extending.
Who can tell me the skills, I appreciate!
best regards

fang
2008.07.17
Jul 17 '08 #1
6 1797
tc**@sina.com schrieb:
dear all:

I have searched the debug informations of many python's IDE, but I
cannot find the method about debuging the extend module written in
Visual studio 2008 on windows.
The wingIDE tell me that we can debug the extend module on linux, but
cannot on windows. and using wingdbstub.py we can embed python into
other's source code but not extending.
Who can tell me the skills, I appreciate!
I use plain gdb (aka the C-debugger) for this purpose. Create a small
test-script that exposes the error you want to debug, and then start the
python interpreter in the debugger. Set breakpoints, or watch backtraces.

I can't comment on how that works on VS08 though - but it shouldn't be
to hard.

Diez
Jul 17 '08 #2
dear Diez:

I need step into c function in extending module(DLL) when debugging
the script. and I want Single-step debugging the extend module itself,
but python script Launched The whole process.

best regards

fang
Jul 17 '08 #3
tc**@sina.com schrieb:
dear Diez:

I need step into c function in extending module(DLL) when debugging
the script. and I want Single-step debugging the extend module itself,
but python script Launched The whole process.
That is exactly what attaching a C-debugger to python will give you. Did
you actually try it? Do you know how to debug C-programs?

Diez
Jul 17 '08 #4
Dear Diez:

It is attaching a C-debugger to python. I can attach python-
debugger(for example:wingIDE ) to c-debugger(for example:VS2008) , but I
cannot attach VS2008 to wingIDE. I need both python statement and c
statement can be single-step debugged.

best regards

fang
Jul 17 '08 #5
fang wrote:
Dear Diez:

It is attaching a C-debugger to python. I can attach python-
debugger(for example:wingIDE ) to c-debugger(for example:VS2008) , but I
cannot attach VS2008 to wingIDE. I need both python statement and c
statement can be single-step debugged.
AFAIK that's not possible. First of all, *don't* attach VS2008 to WingIDE,
use VS2008 to start a python-interpreter with commandline-args (at least
that's how it works for me in gdb)

And then write only small python-scripts that expose an actual error in the
DLL, and debug these.

Diez
Jul 17 '08 #6
Dear Diez:

I see. I appreciate your help really.
best regards
fang

Jul 17 '08 #7

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

Similar topics

24
3150
by: Jean-Baptiste PERIN | last post by:
Hi, I'm trying to make a windows dll reachable from a python script .. and I'm encountering troubles during link step .. I use "lcc" to compile and link I use python 2.3 under win XP Here's the compile command which seems to work well : -----------------------------------------------------
1
2086
by: Petr Prikryl | last post by:
Do you think that the following could became PEP (pre PEP). Please, read it, comment it, reformulate it,... Abstract Introduction of the mechanism for language extensions via modules written using other languages. Extensions of Python could be done via special interpreter extensions. From Python sources, the special modules would look like other modules, with the Python API (the key feature from
0
324
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 421 open ( -2) / 3549 closed (+10) / 3970 total ( +8) Bugs : 943 open (-17) / 6471 closed (+25) / 7414 total ( +8) RFE : 260 open ( +2) / 250 closed ( +1) / 510 total ( +3) New / Reopened Patches ______________________
0
9620
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
9454
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
10261
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
9912
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6715
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.