Help with Eclipse & Pydev Debugging
#1
Hi,

Followed the tutorial here: http://wiki.xbmc.org/index.php?title=HOW...th_Eclipse

Everything mostly works.
Can start Pydev debug server in Eclipse
Then, start the XBMC script.
It will pause on the first line of the script.
I can then press play to continue through the script etc

However, when it get's to the end of the script, it looks like pydevd is not stopping.
Therefore, the script keeps running in XBMC which means I can't restart it, and when closing XBMC, the process remains and the log reads:
ERROR: XBPyThread:Confusedtop - script C:\Users\Matt\AppData\Roaming\XBMC\addons\script.resumex\default.py didn't stop in 5 seconds - let's kill it

Here is the simple test script:

Code:
import sys
import xbmcgui

REMOTE_DBG = True

# append pydev remote debugger
if REMOTE_DBG:
    try:
        import pysrc.pydevd as pydevd
        pydevd.settrace('localhost', stdoutToServer=True, stderrToServer=True)
    except ImportError:
        sys.stderr.write("Error: You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
        sys.exit(1)
        
dialog = xbmcgui.Dialog()
if dialog.yesno("test", "test"):
    print "yes"
else:
    print "no"

So, I just need to know how to kill the pydevd connection at the end of the XBMC script.

Any ideas?
Reply
#2
I've tried running the script outside of XBMC & it closes fine

I can run it multiple times etc.
Reply
#3
If anyone else has a problem.

All i did in the end was write a python script that kills the xbmc.exe process and then restarts it.
So, i just click this instead of the XBMC shortcut.
Reply

Logout Mark Read Team Forum Stats Members Help
Help with Eclipse & Pydev Debugging0