Posts: 14
Joined: Oct 2017
Reputation:
1
I am wondering what fellow coders are using to debug their addons.
I am pretty used to python but I did not find a valid way to debug an addon externally besides verbose logging in kodi.
I tried the eclispse pydev route and also tried web pdb but I found both solutions a bit too clunky to be used especially with addons with multiple external libraries.
I am wondering if I should put my heart at rest and continue the way I am doing or there is just something I am missing.
Posts: 12,455
Joined: Oct 2014
Reputation:
600
This would be better answered in the add-on development section - moving it there.
Posts: 1,662
Joined: Jun 2011
Reputation:
119
2017-11-06, 13:13
(This post was last modified: 2017-11-06, 14:06 by Roman_V_M.)
As to my knowledge, in addition to the listed above there's a remote debugger for Python Tools for Visual Studio that provides similar experience to Eclipse+PyDev, and WinPDB (abandoned for a long time). PyCharm has a remote debugger only in paid version.
But if you find all those debuggers inconvenient as opposite to verbose logging, maybe you are doing something wrong?
Posts: 2
Joined: Jul 2018
Reputation:
0
Hey there,
Any luck with PyCharm ? I tried creating a new script addon with the pydev sources distributed with PyCharm. I am able to attach the debugger and start debugging, but after that, kodi freezes without any messages logged or anything...
Posts: 1,662
Joined: Jun 2011
Reputation:
119
The problem with general purpose remote Python debuggers that they open blocking sockets to receive remote connections and do not track Kodi abort requests.
Posts: 2
Joined: Jul 2018
Reputation:
0
I managed to get it "kind of" working yesterday... had to place a call to pydevd.stoptrace at the end of my addon entry script. That's working... for now. However, I had to create another script addon for pydev and include the sources shipped with pycharm.