[wingide-users] Remote debugging works once

Mark A. Schmucker masc at rincon.com
Thu Sep 4 11:32:44 MDT 2008

Hi, I have a C++ application with an embedded Python interpreter that
imports a Python script. I'm using Wing's remote debugging capability to
debug the script. When I tell the app to import the script, my breakpoint in
the script gets hit- once. If I "continue" so it exits the script, then tell
my app to import the script again, the script does get imported, but my
breakpoint does not get hit.
If I restart the app it works again- once.
My first thought was that I need to reload() the script or something,
however if I modify the script between imports, the script's print
statements do reflect the changes. So I believe it is being reloaded
Both before and after the successful import, Wing says it is listening for
remote connections: "No debug process / listening for connections on TCP/IP
port 50010. Allowed hosts:" (and some other hosts that I also
listen to).
My code to import the script using the embedding interpreter is pretty
simple right now, and it seems to work, so I don't believe it's the problem
but will include it anyway:
PyObject *str = PyString_FromString("__main__");
PyObject *main_module = PyImport_Import(str);
PyObject *main_dict = PyModule_GetDict(main_module);
FILE *fp = fopen("test.py", "rt");
PyRun_File(fp, filename, main_dict, main_dict);
Any ideas why my breakpoint only works once?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20080904/5aeeb03f/attachment.html

More information about the wingide-users mailing list