[wingide-users] Debugging an Embedded Python Script

theDarkBrainer theDarkBrainer at gmail.com
Sun Aug 7 18:18:40 MDT 2011


i'm new to python and Wing IDE.

i'm experimenting in embedding python in a custom application. everything
works just fine on the python side, but now i'm looking in a way of
providing debugging capabilities for the customers who use python in this
custom application.

I'm experimenting on windows. I have an .EXE that uses python as DLL. The
app does nothing but loads 'Program.py' and runs a function. Everything runs

So, I copied 'wingdbstub.py' to the same folder where the Program.py is, and
then I added:
import wingdbstub

When I try to run the app through Wing IDE, i got an exception from the app:
try to enable wingdb...
   Python: Error: TraceBack:
Traceback (most recent call last):
  File "C:\PythonTest\PySource\Program.py", line 31, in <module>
  File "C:\PythonTest\PySource\wingdbstub.py", line 254, in Ensure
    raise ValueError("No debugger")
ValueError: No debugger

It seems that the environment variable 'WINGDB_ACTIVE' is not set.

I've tried to follow the instructions and set up the Wing IDE to use remote
debugging in Edit -> Preferences -> Debugger -> Advanced/Remote. Also, i've
set kEmbedded = 1 in wingdbstub.py ... no result.

i must be missing something simple ...

any help will be appreciated.

Thank you,

View this message in context: http://wingide.992054.n4.nabble.com/Debugging-an-Embedded-Python-Script-tp3725854p3725854.html
Sent from the WingIDE - User mailing list archive at Nabble.com.

More information about the wingide-users mailing list