Debugging Python Scripts inside other processes

A

A. Klingenstein

I embedded Python in a Windows C++ program. Now I want to debug my
embedded scripts which of course won't run in any IDE process.
Commercial IDEs like WingIDE can attach to external processes by
importing a module in the scripts. Is there a debugger capable of this
which is Free or Open Source?

What I need are the following things:
- runs in Windows
- single stepping
- variable watches
- breakpoints

Just the typical debugger stuff.

Alex
 
R

Robin Becker

A. Klingenstein said:
I embedded Python in a Windows C++ program. Now I want to debug my
embedded scripts which of course won't run in any IDE process.
Commercial IDEs like WingIDE can attach to external processes by
importing a module in the scripts. Is there a debugger capable of this
which is Free or Open Source?

What I need are the following things:
- runs in Windows
- single stepping
- variable watches
- breakpoints

Just the typical debugger stuff.

Alex
I used hapdebugger for such a purpose some time ago, but I believe it
needs a special startup python.exe.
 
A

A. Klingenstein

Robin said:
I used hapdebugger for such a purpose some time ago, but I believe it
needs a special startup python.exe.

I looked at it, but couldn't get it to work. A special python.exe won't
work for me since I only link against python24.dll, nothing else

Alex
 
P

Peter Maas

A. Klingenstein said:
I embedded Python in a Windows C++ program. Now I want to debug my
embedded scripts which of course won't run in any IDE process.
Commercial IDEs like WingIDE can attach to external processes by
importing a module in the scripts. Is there a debugger capable of this
which is Free or Open Source?

What I need are the following things:
- runs in Windows
- single stepping
- variable watches
- breakpoints

Does your Windows C++ program have a working stdin/stdout/stderr,
i.e. kind of a console? Then you could insert

import pdb
pdb.set_trace()

at a position in your embedded scripts where you want debugging to
start. If your C++ program doesn't have a console then perhaps you
can provide one with a Win32 call? Just guessing here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top