Is the how to debug in Eclipse up to date?
#1
Hi Folks

I am just embarking on my XBMC plugin journey. I am trying to learn Eclipse, Python and XBMC Plugins at the same time. Good fun! I have some programming background (some PHP recently, and a good deal of Java, C, SQL back about 12 years ago...)...it doesn't look TOO crazy except for maybe digging up all the XBMC docs Smile

I have got the basics up and running and have a plugin going with some empty directory items. I am about to start pulling in some images (radar + overlay images) to combine them into a movie (or run as a slideshow, not sure yet what the best approach is).

Anyways I have Aptana Studio 3 (basically Eclipse) set up and everything seem to be in the right place. I followed this guide:
http://wiki.xbmc.org/index.php?title=HOW...on_install
...to set up remote debugging in Eclipse. This seems to be somewhat working, except:

It doesn't seem to pause by default, as indicated in that doc - the script just runs.

Stdout is going to the right place, the Aptana console, so I can print stuff as needed

...but, I am getting:

Code:
Traceback (most recent call last):
  File "C:\Program Files (x86)\XBMC\system\python\Lib\pysrc\pydevd.py", line 779, in trace_dispatch
    filename, base = GetFilenameAndBase(frame)
  File "C:\Program Files (x86)\XBMC\system\python\Lib\pysrc\pydevd_file_utils.py", line 225, in GetFilenameAndBase
    filename = xbmc.translatePath(filename)
UnboundLocalError: local variable 'filename' referenced before assignment
Traceback (most recent call last):
  File "C:\Program Files (x86)\XBMC\system\python\Lib\pysrc\pydevd.py", line 779, in trace_dispatch
    filename, base = GetFilenameAndBase(frame)
  File "C:\Program Files (x86)\XBMC\system\python\Lib\pysrc\pydevd_file_utils.py", line 225, in GetFilenameAndBase
    filename = xbmc.translatePath(filename)
UnboundLocalError: local variable 'filename' referenced before assignment
Traceback (most recent call last):
  File "C:\Program Files (x86)\XBMC\system\python\Lib\pysrc\pydevd.py", line 779, in trace_dispatch
    filename, base = GetFilenameAnd...

...I HAVE done the copy pysrc thing, and added the 4 lines of
Code:
filename = xbmc.translatePath(filename)

Is the doc up to date or have I screwed up somehow? Is it because I am using Aptana (which I chose at it was recommended on the PyDev page as an integrated option) - rather than straight Eclipse?

It doesn't seem to cause any functional issues but I'd prefer not to have it as I'm worried that (and the fact scripts aren't starting paused) means I have stuffed up...

Any help appreciated - I just need to get over the initial environment, set up and basic structure humps so I can start making something useful!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
Maybe someone else can chime in here but I don't think it is....I'm getting unresolved imports on the XBMC stuff.
Reply
#3
eclipse debugging is working for me using that tutorial.
Reply
#4
kruuth Wrote:Maybe someone else can chime in here but I don't think it is....I'm getting unresolved imports on the XBMC stuff.
I've updated the wiki to indicate how to get around the unresolved imports messages (thanks to jfcarroll for the predefined completions plugin!).

http://wiki.xbmc.org/index.php?title=HOW...ptional.29
Reply
#5
I am stuck following the tutorial, but I believe it's my own ignorance that causes it. The sources files are imported into a new directory and XBMC still uses the original files.The changes I make have no effect. Am I missing something?

Oyvind
Reply
#6
I realized that the code for remote debugging should be added to the original Default.py file, not to the file in the eclipse project. Fixed that and it works fine now.
Thanks,

Oyvind
Reply
#7
Not in any way helpful, but completely relevant: http://i.imgur.com/TS77f.jpg
Reply
#8
I have issues importing pydevd into plugin script - pydevd tries to import lot of things - one of those things is third_party/pluginbase.py
pluginbase.py fails to import pydevd_constants which is in the parent folder.

Pydev version I use is 3.8 and the Python interpreter version used by XBMC (Frodo) is 2.6.6.

Pydev states that it is compatible with Python >= 2.1 but it seems like the way imports are being resolved has changed in 2.7 which may be an issue here.
Any thoughts?
Reply

Logout Mark Read Team Forum Stats Members Help
Is the how to debug in Eclipse up to date?0