Debugging Embedded Python
Chris Liechti
cliechti at gmx.net
Fri Jul 12 16:49:26 EDT 2002
mark.charsley at REMOVE_THIS.radioscape.com (Mark Charsley) wrote in
news:memo.20020712144413.1996A at a.a:
> We've got a (win32) C++ program that has an embedded python
> interpreter that runs a bunch of scripts. We've been asked to enable
> it's users to run the python scripts under a debugger, allowing the
> users to put in breakpoints, examine/alter values etc.
this is in the sys module:
settrace(tracefunc)
Set the system's trace function, which allows you to implement a Python
source code debugger in Python. See section 9.2, ``How It Works,'' in the
chapter on the Python debugger. The function is thread-specific; for a
debugger to support multiple threads, it must be registered using
settrace() for each thread being debugged.
so you could write the trace function in your c/c++ extension and register
it in the embedded python interpreter. that means that you write your own
debugger but its one way. an other is that you could (maybe) use a remote
debugger like HAP (somewhere on sf.net).
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list