Is there a Python debugger for XBMC?
#1
Lightbulb 
Hi guys,

I was wondering if there is a Python debugger for XBMC.

Most of the time I am OK without, but it would be a huge plus to have a way to run python scripts and plugin in debugger. Logs give you a lot of info but unfortunately sometimes it is not enough.

So first of all I would like to know if someone found a way to set a python debugger used with XBMC (in this case thank for telling us how you did)?

In the past we had the XBMC emulator but I don't think it is up to date and probably it is not enough in case of complex script with a GUI.

I know one of the method is to separate code in module and test module which does not import xbmc or xbmcgui outside XBMC. But again when a bug occurs it is usually with the all system which means debugging ...

Let me share few ideas with you guys (please let me know what do you think about it):
- eclipse provide pydev and pydev extension, the fisrt one provide syntax highlighting and the last one has a remote debugger listening on a specific port which is used for instance in django application development, so I am pretty sure we can have something similar with XBMC (similar to Alex poet persistence listening on a port too).

- The complexity here (I think) is to be able to run the script/plugin in XBMC from eclipse. So ideally from command line, but I am not aware of the possibility to start a script/plugin in XBMC from the command line.

Any ideas, suggestion?

In all the cases with the increasing popularity of XBMC and the number of developers doing an amazing work on addons for XBMC in python, it would be a hug step to have such tool or a way to have more evolve debug tool.

Thanks in advance.
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#2
Yea it could very handy for plugin developers. I'm always writing plug-ins like a blind before trying on XBMC...

P.S = I'm also using eclipse for writing my plugins.
Reply
#3
I think I found a way to use a python debugger with XBMC. I have to dig a little bit more, but it seems promising. It probably won't be perfect, but is should be useful.
I will post the method if I succeed.
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#4
I've just added a section to the XBMC online manual on how to do this:

http://wiki.xbmc.org/index.php?title=HOW...on_Scripts
MythBox for XBMC - http://mythbox.googlecode.com
Reply
#5
Thank you analogue for this method. Mine is very similar but with Eclipse and Pydev. If you don't mind could you rename your wiki page sith something like that:
HOW-TO debug Python Scripts on Linux with WinPDB
I will have to create one with a name like:
HOW-TO debug Python Scripts with Eclipse (multiplatform)

Or we can put everything on the same page (but I am not ready yet)
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#6
As analogue, I created in XBMC Wiki a page HOW-TO debug Python Scripts with Eclipse

I have also updated the main page XBMC Online Manual with the link on both methods (analogue and mine) which are pretty similar at the end of the day (except the debugger used)
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#7
Perfect.. very handy, thanks guys...
Reply
#8
(2010-04-04, 02:38)Temhil Wrote: As analogue, I created in XBMC Wiki a page HOW-TO debug Python Scripts with Eclipse

I have also updated the main page XBMC Online Manual with the link on both methods (analogue and mine) which are pretty similar at the end of the day (except the debugger used)

Hi Temhil,
I spent hours trying to apply your instruction on Mac OSX with no success.
Can you help us to get things working on Mac OSX?
I installed Eclipse Mars.2 (4.5.2); Python 3.5;Kodi 16.1 (Jarvis).To get completion I refer to kodistubs-master.zip
To get debug on I tried Option 1 and Option 3 but nothing to do.

I would start debugging form existing add ons just installed on Kodi.

Thanks in advance for your kind reply.
Reply
#9
Seems nobody try to debug kodi addons in eclipse, isn't it?
No one can help me?
Thanks in advance.
Best
Reply
#10
(2016-10-17, 20:21)m.lombardo Wrote: Seems nobody try to debug kodi addons in eclipse, isn't it?
No one can help me?
Thanks in advance.
Best

Try LiClipse instead of eclipse, yes it is close source but it does not restrict using after expiring, because author is aware of hobbist and you may pay your license after seeing how dramatically it differs from eclipse in terms of speed and customization.

I am beginner too and remote debugging is not trivial to setup if you are completely new in programming generally.
Here are information about my experience:
http://forum.kodi.tv/showthread.php?tid=...pid2407205
Good luck bro.
Reply
#11
Probably a beginner's question regarding Winpdb:
I installed successfully winpdb on Win 8.1 pro and I can follow my Kodi 16.1 addons with it, but just until the addon requests an action by the user.
For example the addon starts, get initialized and the main menu is built. Normally the user would have got to select a menu entry now and that's where the debuggers stops/hangs. Nor can I select a menu entry within Kodi neither can I get the debugger to advance.
Anyone has got an idea what to do ?
Reply
#12
(2010-03-24, 23:29)Temhil Wrote: Hi guys,

I was wondering if there is a Python debugger for XBMC.

Most of the time I am OK without, but it would be a huge plus to have a way to run python scripts and plugin in debugger. Logs give you a lot of info but unfortunately sometimes it is not enough.

So first of all I would like to know if someone found a way to set a python debugger used with XBMC (in this case thank for telling us how you did)?

In the past we had the XBMC emulator but I don't think it is up to date and probably it is not enough in case of complex script with a GUI.

I know one of the method is to separate code in module and test module which does not import xbmc or xbmcgui outside XBMC. But again when a bug occurs it is usually with the all system which means debugging ...

Let me share few ideas with you guys (please let me know what do you think about it):
- eclipse provide pydev and pydev extension, the fisrt one provide syntax highlighting and the last one has a remote debugger listening on a specific port which is used for instance in django application development, so I am pretty sure we can have something similar with XBMC (similar to Alex poet persistence listening on a port too).

- The complexity here (I think) is to be able to run the script/plugin in XBMC from eclipse. So ideally from command line, but I am not aware of the possibility to start a script/plugin in XBMC from the command line.

Any ideas, suggestion?

In all the cases with the increasing popularity of XBMC and the number of developers doing an amazing work on addons for XBMC in python, it would be a hug step to have such tool or a way to have more evolve debug tool.

Thanks in advance.

http://forum.kodi.tv/showthread.php?tid=292141
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a Python debugger for XBMC?0