Release script.module.remote-pdb: a remote debugger for addon developers
script.module.remote-pdb is a remote (telnet) interface to Python's built-in PDB debugger. It is based on remote-pdb package with several changes needed for running inside Kodi. All core debugging functionality is left intact.

script.module.remote-pdb allows you debug your Python addons remotely when they are running inside Kodi.


1. Download an installable ZIP from this page and install it in your Kodi instance.

2. Add script.module.remote-pdb to your addon.xml as a dependency:

  <import addon="script.module.remote-pdb" version="1.2"/>

3. Insert the following line in your code at the place where you want to start debugging from:

from remote_pdb import set_trace; set_trace(host='', port=5555)

You can use another port if you like.
After hitting the first set_trace call script.module.remote-pdb will suspend your addon execution and wait for a remote telnet connection. At the same time a notification will be displayed inside Kodi with a hostname and a port to connect to. Subsequent set_trace() calls (without arguments) can be used as hardcoded breakpoints.

4. Connect to the remote debugger using a telnet client:

telnet <your kodi hostname or IP> 5555

On Linux a telnet client is available out of the box, and on Windows I'd recommend to use PuTTY utility in "Raw" mode.
The telnet client will connect to the remote debugger and open a PDB console where you can use all PDB features to debug your addon.

Warning: when you finish your debugging, don't forget to remove script.module.remote-pdb from your addon dependencies and set_trace call(-s) from the code.

script.module.remote-pdb GitHub repo:
The original remote-pdb package:
The official PDB documentation:
A PDB tutorial: https://pythonconquerstheuniverse.wordpr...-in-python
Sounds pretty useful. Thank you for this.
Thanks. In fact, I didn't stop on that and developed my own remote debugger with a web-interface:
And this is a port for Kodi: I'm still making final touches but it seems pretty stable at this point. I'll create a separate topic for it when it's ready. My debugger is also based on Python's built-in PDB (it's available out of the box, after all), but with several convenience features.

Logout Mark Read Team Forum Stats Members Help
script.module.remote-pdb: a remote debugger for addon developers0
This forum uses Lukasz Tkacz MyBB addons.