Python programming developement environment?
#1
Hello,

Is there a Kodi plugin development environment that would allow for debugging a Kodi plugin as it is run? Looking for a way to step through a plugin using Kodi or a kodi simulator on one screen while watching what the code is doing on another screen. Is this a possibility?

Thanks!
Mark
Reply
#2
You can use remote debug modules of pydev/pycharm, or the web module of PDB
Reply
#3
https://github.com/hbiyik/repository.biy...ner.py#L41

For your referennce on pydev debugger.
Reply
#4
(2019-12-14, 00:20)boogiepop Wrote: https://github.com/hbiyik/repository.biy...ner.py#L41

For your referennce on pydev debugger.
Hi Boogiepop,

Thank you for this, I guess. One of my problems is that I am trying to figure this out with no experience whatsoever. Having said that, I have no idea what to do with this code. Is there a readme somewhere that give a few hints?

Thanks,
Mark
Reply
#5
Hello,

Trying to follow this wiki page: https://kodi.wiki/view/HOW-TO:Debug_Pyth...ile_System and am having a fairly difficult time understanding it completely.

I believe that I have everything configured up to step 3.

I am trying to load a premade plugin, Pseudotv, into eclipse with pydvd so that I can step through and follow the program flow. The plugin is in the standard Windows directory for Kodi:
C:\Users\Mark\AppData\Roaming\Kodi\addons\script.pseudotv

I have my workspace set to: C:\Users\Mark\AppData\Roaming\Kodi\addons

I created a new project called xbmc_addons: C:\Users\Mark\AppData\Roaming\Kodi\addons\xbmc_addons as instructed in step 3.1

Set Python Path as in step 3.2

Step 3.3 is a bit fuzzy to me....Do I check the whole C:\Users\Mark\AppData\Roaming\Kodi\addons folder or do I check the whole C:\Users\Mark\AppData\Roaming\Kodi\addons\script.pseudotv folder or something within for importing the file system?

I have copied the "pysrc" folder found here: C:\Users\Mark\.p2\pool\plugins\org.python.pydev.core_7.4.0.201910251334\pysrc
There was not a pysrc folder here: C:\Users\Mark\.p2\pool\plugins\org.python.pydev.debug_7.4.0.201910251334

3.4.2 IS confusing as well. I am not sure about how to do this:
In order to add the support of XBMC paths, you will need to do a simple modification to the file pydevd_file_utils.py consisting on adding a line to each procedure that had a filename parameter (4 procedures in total). Add a line like

def _NormFile(filename):
filename = xbmc.translatePath(filename)
try: ...

The other three procedures are:
def _NormFile(filename):
def NormFileToServer(filename):
def NormFileToClient(filename):
of course you need the import directive at the top of the file:
import xbmc
at the beginning of the module...

Could someone explain this a bit better, please?

I added the code at step 3.5 to the default.py in the Pseudotv directory. This was added after the comments and before the imports.

I ran as in step 3.6. Started Kodi, and selected the plugin. There was no indication that anything was happening or being logged within Eclipse and the plugin did appear to be frozen. The "resume" button in eclipse was greyed out and could not be selected.

I would very much appreciate any help with this from someone.

Thank you,
Mark
Reply
#6
(2019-12-14, 17:43)mwkurt Wrote: Hello,

Trying to follow this wiki page: https://kodi.wiki/view/HOW-TO:Debug_Pyth...ile_System and am having a fairly difficult time understanding it completely.

I believe that I have everything configured up to step 3.

...
Hi Mark,
unfortunately, I am not able to help with your scenario but here are my experiences with remote addon debugging: https://forum.kodi.tv/showthread.php?tid...pid2440698
If I remember well it was a very time-consuming task and there was a real shortage of information on this subject. Sometimes it is better to wipe out the table and start again from the beginning.
 Good luck 
           zbyna
Reply

Logout Mark Read Team Forum Stats Members Help
Python programming developement environment?0