Debugging embedded python

Syver Enstad syver-en+usenet at
Mon Apr 7 01:22:31 CEST 2003

Mark Hammond <mhammond at> writes:

> Syver Enstad wrote:
> > I have the python interpreter embedded in a daemon/service (this is
> > win2k so it's a service). I'd really like to be able to debug the
> > python code that is running. I was thinking of popping up a console
> > window to be able to run pdb, how does one go about it to accomplish
> > this? Are there any code doing similar things or articles.

> You should be able to run the service in "debug" mode (ie, as a normal
> program" by using the "--debug" option.  Then you can debug however
> you like.

I am fooling around with embedding the python interpreter in an ISAPI
extension under IIS, I assume that you meant running a python service
under PythonService.exe?

> But assuming you do need to debug as a service, you really need an
> out-of-process debugger, like Komodo and most of the commercial
> IDEs. Pythonwin does *not* do out-of-process debugging, so is no
> good.

I haven't needed to debug as a service yet, using regression tests of
the output and printf style debugging has worked well. But I think it
is very useful (and reassuring) that one can inspect the program
thoroughly if one needs to do so (A tricky bug f.ex).


Vennlig hilsen 

Syver Enstad

More information about the Python-list mailing list