Kodi Community Forum

Full Version: Debug python video plugin locally (IDE) ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

As we need some python libs such as codequick, kodi_six, builtins or libs packaged within kodi, to run a video plugin, I'm wondering if it is possible nevertheless to debug a python video plugin locally (with the help of an IDE by example) ?
Can we in this case emulate kodi or use some testing files able to help to log/debug problems ?

Cheers

Charles
(2020-10-09, 15:36)ch007m Wrote: [ -> ]Hi,

As we need some python libs such as codequick, kodi_six, builtins or libs packaged within kodi, to run a video plugin, I'm wondering if it is possible nevertheless to debug a python video plugin locally (with the help of an IDE by example) ?
Can we in this case emulate kodi or use some testing files able to help to log/debug problems ?

Cheers

Charles

Kind of i'm using a combination of kodistubs and a self build menu and callback handler,
to make it work for one of my private addons but it am not using six and codequick.

it also depends on what your addon is doing, interacting with json rpc will be hard without kodi running,
but theoretical you can build a mock for that.

I hope i gave you some ideas to start with.
Personally, I don't like the idea of "local" debugging because your debugging results are only as good as your mocks/stubs are. I can recommend my remote Python debugger: https://github.com/romanvm/kodi.web-pdb, but there are other options for remote debugging.